A request that was addressed to ProRealTime:
SCREENER in real time that alerts me when the following conditions are met:
– for LONG: price close below SMA11 and then close above SMA11. If then sma11 > sma21 > sma50, at the close above sma11 all conditions are met.
– for SHORT: price close above SMA11 and then close below SMA11. If then sma11 < sma21 < sma50, at the close below sma11 all conditions are met.
All SMA are set on close
Suggestion for an anwser:
SMA11=average[11](close)
SMA21=average[21](close)
SMA50=average[50](close)
condition=0
c1=close crosses over SMA11
c2=SMA11 > SMA21 and SMA21 > SMA50
c3= close crosses under SMA11
c4=SMA11 < SMA21 and SMA21 < SMA50
if c1 and c2 then
condition=1
elsif c3 and c4 then
condition=-1
endif
screener[condition]