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]
]
0
Comments
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).
and [min(5, weekly RSI(9)) >90]
So it should be
and [weekly min(5, weekly RSI(9)) >90]