Hi friends. I wanna make a screener for stock thats within 1% from a moving average. I just can’t make myself clear about how to 1% code should be.
It should look like this:
percent = abs(close-average[20])/close*100
return percent
It says return can only be used in trading systems. Can you help me build the screener?
Hi Hock
Replace Return with Screener (Nicolas was just testing us! :))
Cheers
GraHal
Thanks! But i can’t make it work. Can you help me do the screener?
Yes, please find below the screener of your request:
percent = abs(close-average[20])/close*100>=1
screener [percent]
It will detect and sort out all shares with Close more or equal to 1% from the moving average 20 periods.
I nearly always want to see the ‘value’ on a Screener, so if you add / amend as below then you can see what the percentage from MA is.
percent = abs(close-average[20])/close*100>=1
screener [percent] (abs(close-average[20])/close*100 as "percent from MA")