Proscreener divergenza RSI

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #112629 quote
    massimogp
    Participant
    Senior

    Buona sera, ho trovato questo codice pro-screener sulla divergenza RSI a 10 periodi, posso averlo con la sola condizione long e basato sull RSI a 5 periodi (con livelli ipervenduto/ipercomprato a 15 e 85)? Grazie mille Roberto.

    RsiPeriod = 10
    
    //Oversold Level
    RsiOverSold = 30
    
    //OverBought Level
    RsiOverBought = 70
    
    //Minimum distance from two consecutive RSI Highs or RSI Lows
    MinBarRange = 3
    
    MyRSI = rsi[RsiPeriod](Close)
    
    RsiMax = MyRSI < MyRSI[1] and MyRSI[1] > MyRSI[2] and MyRSI[1] > RsiOverBought
    RsiMin = MyRSI > MyRSI[1] and MyRSI[1] < MyRSI[2] and MyRSI[1] < RsiOverSold
    
    if RsiMax then
    RSIMax1 = MyRSI[1]
    High1 = High[1]
    
    for I = MinBarRange to 80
    if RsiMax[I] then
    RSIMax2 = MyRSI[I + 1]
    High2 = High[I + 1]
    break
    endif
    next
    endif
    CondRibassista = RsiMax and ((High1 > High2 and RSIMax1 < RSIMax2) or (High1 < High2 and RSIMax1 > RSIMax2))
    
    if RsiMin then
    RSIMin1 = MyRSI[1]
    Low1 = Low[1]
    for I = MinBarRange to 80
    if RSIMin[I] then
    RSIMin2 = MyRSI[I + 1]
    Low2 = Low[I + 1]
    break
    endif
    next
    endif
    
    CondRialzista = RsiMin and ((Low1 < Low2 and RSIMin1 > RSIMin2) or (Low1 > Low2 and RSIMin1 < RSIMin2))
    
    if CondRibassista then
    Result = -1
    endif
    
    if CondRialzista then
    Result = 1
    endif
    
    SCREENER[CondRibassista or CondRialzista] (Result as “Go”)
    azione-ferrari-1.docx
    #112633 quote
    robertogozzi
    Moderator
    Master

    Ti prego di allegare file del tipo corretto.

    Grazie 🙂

    #112723 quote
    massimogp
    Participant
    Senior

    Buona sera Roberto, chiedo scusa per l allegato che non era  relativo a questa richiesta, la ripropongo  chiedendo codice pro-screener sulla divergenza RSI a 10 periodi, se posso averlo con la sola condizione long e basato sull RSI a 5 periodi (con livelli ipervenduto/ipercomprato a 15 e 85)? Grazie mille Roberto.

    RsiPeriod = 10
    
    //Oversold Level
    RsiOverSold = 30
    
    //OverBought Level
    RsiOverBought = 70
    
    //Minimum distance from two consecutive RSI Highs or RSI Lows
    MinBarRange = 3
    
    MyRSI = rsi[RsiPeriod](Close)
    
    RsiMax = MyRSI < MyRSI[1] and MyRSI[1] > MyRSI[2] and MyRSI[1] > RsiOverBought
    RsiMin = MyRSI > MyRSI[1] and MyRSI[1] < MyRSI[2] and MyRSI[1] < RsiOverSold
    
    if RsiMax then
    RSIMax1 = MyRSI[1]
    High1 = High[1]
    
    for I = MinBarRange to 80
    if RsiMax[I] then
    RSIMax2 = MyRSI[I + 1]
    High2 = High[I + 1]
    break
    endif
    next
    endif
    CondRibassista = RsiMax and ((High1 > High2 and RSIMax1 < RSIMax2) or (High1 < High2 and RSIMax1 > RSIMax2))
    
    if RsiMin then
    RSIMin1 = MyRSI[1]
    Low1 = Low[1]
    for I = MinBarRange to 80
    if RSIMin[I] then
    RSIMin2 = MyRSI[I + 1]
    Low2 = Low[I + 1]
    break
    endif
    next
    endif
    
    CondRialzista = RsiMin and ((Low1 < Low2 and RSIMin1 > RSIMin2) or (Low1 > Low2 and RSIMin1 < RSIMin2))
    
    if CondRibassista then
    Result = -1
    endif
    
    if CondRialzista then
    Result = 1
    endif
    
    SCREENER[CondRibassista or CondRialzista] (Result as “Go”)
    #112741 quote
    robertogozzi
    Moderator
    Master

    Per favore utilizza il pulsante “Insert PRT code, <>” per inserire il codice e renderlo più leggibile.

    Grazie 🙂

    #112742 quote
    robertogozzi
    Moderator
    Master

    Cambia i periodi da 10 a 5, l’ipervenduto da 30 a 15, l’ipercomprato da 70 a 85 ed infine togli dall’ultima riga (dove c’è SCREENER), la condizione:

    CondRibassista or

    in modo che venga così:

    RsiPeriod = 5
     
    //Oversold Level
    RsiOverSold = 15
     
    //OverBought Level
    RsiOverBought = 85
     
    //Minimum distance from two consecutive RSI Highs or RSI Lows
    MinBarRange = 3
     
    MyRSI = rsi[RsiPeriod](Close)
     
    RsiMax = MyRSI < MyRSI[1] and MyRSI[1] > MyRSI[2] and MyRSI[1] > RsiOverBought
    RsiMin = MyRSI > MyRSI[1] and MyRSI[1] < MyRSI[2] and MyRSI[1] < RsiOverSold
     
    if RsiMax then
    RSIMax1 = MyRSI[1]
    High1 = High[1]
     
    for I = MinBarRange to 80
    if RsiMax[I] then
    RSIMax2 = MyRSI[I + 1]
    High2 = High[I + 1]
    break
    endif
    next
    endif
    CondRibassista = RsiMax and ((High1 > High2 and RSIMax1 < RSIMax2) or (High1 < High2 and RSIMax1 > RSIMax2))
     
    if RsiMin then
    RSIMin1 = MyRSI[1]
    Low1 = Low[1]
    for I = MinBarRange to 80
    if RSIMin[I] then
    RSIMin2 = MyRSI[I + 1]
    Low2 = Low[I + 1]
    break
    endif
    next
    endif
     
    CondRialzista = RsiMin and ((Low1 < Low2 and RSIMin1 > RSIMin2) or (Low1 > Low2 and RSIMin1 < RSIMin2))
     
    if CondRibassista then
    Result = -1
    endif
     
    if CondRialzista then
    Result = 1
    endif
     
    SCREENER[CondRialzista] (Result as “Go”)
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Proscreener divergenza RSI


ProScreener: Scansione Mercati & Screener

New Reply
Author
author-avatar
massimogp @massimogp Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by robertogozzi
6 years, 3 months ago.

Topic Details
Forum: ProScreener: Scansione Mercati & Screener
Language: Italian
Started: 11/12/2019
Status: Active
Attachments: 1 files
Logo Logo
Loading...