RSI and Donchian screener

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #86344 quote
    robdav
    Participant
    Veteran

    Hi

    I’m trying to right a screener which looks for overbought or oversold conditions but I’m not sure if one screener can be used to achieve this.

    I want it to display either overbought or oversold so I know which is which if that makes sense.

    I have included the code but I’m not sure it works as is.

    Thanks

    Rob

    // Overbought maybe
    
    hh = highest[30](high)
    MyRSI = RSI[5]
    
    c1 = high[1] = hh
    c2 = MyRSI > 70
    
    Overbought = c1 AND c2
    
    // Oversold maybe
    
    ll = lowest[30](low)
    
    c4 = low[1] = ll
    c5 = MyRSI < 30
    
    Oversold = c4 AND c5
    
    Screener[Overbought or Oversold]
    #86352 quote
    robertogozzi
    Moderator
    Master

    Try

    // Overbought maybe
     
    hh = highest[30](high)
    MyRSI = RSI[5]
     
    c1 = high[1] = hh
    c2 = MyRSI > 70
     
    Overbought = c1 AND c2
     
    // Oversold maybe
     
    ll = lowest[30](low)
     
    c4 = low[1] = ll
    c5 = MyRSI < 30
     
    Oversold = c4 AND c5
    
    x=0
    If OverBought THEN
       x=1
    Elsif OverSold THEN
       x=2
    ENDIF
     
    Screener[x]
    robdav thanked this post
    #86362 quote
    robdav
    Participant
    Veteran

    Thanks. modified it slightly, seems to work now. Thank you Roberto!

    // Overbought maybe
    
    hh = highest[30](high)
    MyRSI = RSI[5]
    
    c1 = high[1] = hh
    c2 = MyRSI > 70
    
    Overbought = c1 AND c2
    
    // Oversold maybe
    
    ll = lowest[30](low)
    
    c4 = low[1] = ll
    c5 = MyRSI < 30
    
    Oversold = c4 AND c5
    
    x=0
    If OverBought THEN
    x=70
    Elsif OverSold THEN
    x=30
    ENDIF
    
    Screener[x](x as "Result")
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

RSI and Donchian screener


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
robdav @robdav Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by robdav
7 years, 3 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 12/05/2018
Status: Active
Attachments: No files
Logo Logo
Loading...