Hi,
I need some help with the attached screener because it seems not to work. It is intended that the screener select shares which the last five candles are closed above the 50EMA.
Upper=exponentialaverage[50]
BaseCandle = 5
Close0 = Close[BaseCandle]
Close1 = Close[BaseCandle + 1]https://www.prorealcode.com/forum/prorealtime-english-forum/proscreener-support/#
Close2 = Close[BaseCandle + 2]
Close3 = Close[BaseCandle + 3]
Close4 = Close[BaseCandle + 4]
C1 = Close0>Upper and Close1>Upper and Close2>Upper and Close3>Upper and Close4>Upper
Screener [ (C1) ]
This works the same as above:
Upper = exponentialaverage[50]
LookBack = 5
C1 = (summation[LookBack](close > Upper) = LookBack)
Screener [C1]
Thank you @robertogozzi,
I have tried your suggestion and it worked, but not as I would like to. Your code generates a screen for more than the five last closes above the EMA.
Do you have a suggestion for a of code that screens shares with the last five closes above the EMA only?
Best regards
Marcel van Vliet
Only 5 bars:
Upper = exponentialaverage[50]
LookBack = 5
C1 = (summation[LookBack](close > Upper) = LookBack)
IF C1 THEN
IF C1[1] THEN
C1 = 0
ENDIF
ENDIF
Screener [C1]