Timeframe (daily)
SMA200 = Average[200](close)
Timeframe (default)
percent = 0.2 // modificar segun criterio
a = (ABS(high - SMA200))/ Close < (percent/100)
b = (ABS(low - SMA200))/ Close < (percent/100)
SCREENER [a or b]
Hi,
I am triing to have an screener that indicates when the SMA200 daily is close in percetage to the actual price.
I tried the code above bu in some cases is not working well.
Thans in advance
Try this one (not tested):
Timeframe (daily)
SMA200 = Average[200](close)
Timeframe (default)
PerCent = 0.2
Close2Sma200 = ABS(1 - (close / SMA200)) * 100
SCREENER[Close2Sma200 <= PerCent]
Thanks Roberto,
I tried (I think the difference is you ckeck he close and I check the low and the high) and It seems that It is ok but sometime it is no working properly.
For instance, check EURDKK, It is not close but both screeners give as a result the EURDKK, very strange.
Thanks in advance
EURDKK is fine, close is currently above SMA200 a bit less than 0.2%.
If you want to use HIGH or LOW, just replace CLOSE at line 5.
Hi,
Many thanks, yo are right. It is working fine, my mistake, sorry.