New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.

RSI over 90 scan consolidation

Hi there, does anyone know if there's a way to consolidate these scans? i'd like to scan for say 5 days or 10 days of this without having to type out 1 day ago, 2 days ago, 3 days ago.. etc. Thanks!

and [Open > Daily upper BB(20,2.0) *1.01]
or [1 day ago open > 1 day ago upper BB(20,2.0) *1.01]
or [2 days ago open > 2 days ago upper BB(20,2.0) *1.01]



and [
[daily rsi(9) > 90.0]
or [1 day ago rsi(9) > 90.0]
or [2 days ago rsi (9)> 90.0]
]

Comments

  • When the threshold value is static - like 90 - you can use the max or min function.

    So,

    and [min(5, RSI(9)) > 90]

    says the rsi has not been below 90 (i.e. has been greater than 90) for 5 bars (the current bar and the four preceding it). You have to use min because if you test for max > 90, that would be true if only one bar were > 90. Any of the others could be less than 90 but the max function wouldn't care.


    But when the threshold value is dynamic (changeable), as upper BB would be, in most cases you have to test each bar as you have chosen to do in the example. (For indicators that incorporate a histogram (like MACD), you can test for the histogram > 0 to see whether one value is above another for several bars, but you can't do that here).
  • edited January 3
    I'm actually looking for just one bar of RSI 90 so i think the max works (or function so as long as it finds an RSI > 90 on any day)! How would you account for say a weekly rsi or monthly rsi? would it be:

    and [min(5, weekly RSI(9)) >90]
  • Would it be different if i wanted to scan for anything with RSI < 30 over the last 30 days? I just wrote [min (30, rsi (9)) < 30] and nothing generated
  • lmkwinlmkwin ✭✭
    run against the SP500, SP400, SP600 [min (30, rsi (9)) < 30] returns 154 results
  • When you want to run a scan against a time frame other than daily, you specify the time frame you want with a modifier (weekly, monthly) on both the function and the indicator or any term that could take a modifier (like high, close, open, etc.)

    So it should be

    and [weekly min(5, weekly RSI(9)) >90]
Sign In or Register to comment.