Divergences STOCHASTIC Screener

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #160959 quote
    jaumet2001
    Participant
    New

    Hola, se podria hacer el mismo screener pero con el estocástico?? Gracias y un saludo.

    #160963 quote
    robertogozzi
    Moderator
    Master

    Se refiere al tema https://www.prorealcode.com/topic/divergences-screener/ , pero el tema no es el MACD, por lo que necesita crear un tema nuevo, de lo contrario se vuelve difícil poder buscar. NO ponga en cola solicitudes diferentes (incluso si son similares) a temas existentes. Gracias 🙂

    #160969 quote
    robertogozzi
    Moderator
    Master

    Ahi esta:

    ///////////////////////////////////////////////////////////
     
    // STOCH divergences on price  (original for MACD)
    // by Jose Callao
    // twitter @jose7674
    // attach this indicator to the chart
     
    N=40///N is the number of bars to look back for a divergence. Normal values are 20-40. Must be the same in both indicators
     
    //using any other indicator is as easy as changing the values
    miSTOCH = Stochastic[14,3](close)
    Signal = 0
    IF (BarIndex > 10+1+N) THEN
     
    //we look for bearish divergences
    IF (miSTOCH[1]>miSTOCH AND miSTOCH[1]>miSTOCH[2]) THEN
    extremum2=miSTOCH[1]
    extremum1=highest[N](miSTOCH)
     
    preciomax2=close[1]
    preciomax=Highest[N](close)
    IF(extremum2<extremum1 AND preciomax2>preciomax[1]) THEN
    for i=1 to N
    if close[i]=preciomax[1] then
    //zz=i
    Signal = 2
    //drawsegment (barindex[1], close[1], barindex[zz], close[zz]) coloured(200,0,0)
    endif
    next
     
    endif
    endif
     
    //we look for bullish divergences
    IF (miSTOCH[1]<miSTOCH AND miSTOCH[1]<miSTOCH[2]) THEN
    extremum22=miSTOCH[1]
    extremum11=lowest[N](miSTOCH)
     
    preciomin2=close[1]
    preciomin=lowest[N](close)
     
    IF(extremum22>extremum11 AND preciomin2<preciomin[1]) THEN
    for i2=1 to N
    if close[i2]=preciomin[1] then
    //zz2=i2
    Signal = 1
    //drawsegment(barindex[1], close[1], barindex[zz2], close[zz2]) coloured(0,200,0)
    endif
    next
    endif
    endif
    endif
    SCREENER[Signal](Signal AS "1=↑, 2=↓")
    #160993 quote
    jaumet2001
    Participant
    New

    Muchas gracias Roberto por el screener y disculpa mi error.

    Gracias y un saludo!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Divergences STOCHASTIC Screener


ProScreener: Buscadores de Mercado y Rastreo

New Reply
Author
author-avatar
jaumet2001 @jaumet2001 Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by jaumet2001
5 years, 1 month ago.

Topic Details
Forum: ProScreener: Buscadores de Mercado y Rastreo
Language: Spanish
Started: 02/10/2021
Status: Active
Attachments: No files
Logo Logo
Loading...