Hello. I want to build a screener that show me the stocks that match the following criteria:
a) long ENTRY:
1. 25 day simple moving average going up, and
2. RSI 5 periods is about to cross up level 20.
b) short ENTRY
- 25 day simple moving average going down, and
- RSI 5 periods is about to cross down level 70
Thank you in advance.
1 – what do you mean by SMA25 going up? Simply > than the previous candle or also below price in an uptrend?
2 – what do you mean by RSI5 about to cross up 20? 19.8, 19.0,…. or simply greater than the previous candle but still < 20?
With the above parameters I could not get any entry. To test it I had to use SMA100 + RSI5 with limits 15-20 and 70-75, but you’ll find those that suit you best:
Sma25 = Average[25,0](close)
UPsma = close > Sma25 AND Sma25 > Sma25[1]
DNsma = close < Sma25 AND Sma25 < Sma25[1]
Rsi5 = Rsi[5](close)
UPrsi = Rsi5 > Rsi5[1] AND Rsi5 <= 20 AND Rsi5 >= 19.5
DNrsi = Rsi5 < Rsi5[1] AND Rsi5 >= 70 AND Rsi5 <= 70.5
Result = 0
IF UPsma AND UPrsi THEN
Result = 1 //1 = LONG entry
ELSIF DNsma AND DNrsi THEN
Result = 2 //2 = SHORT entry
ENDIF
SCREENER[Result] (Result AS "L/S")