Hello,
I’m looking for help to create a screener that will find stocks in the bottom phase.
Was listening to a podcast that had a suggestion something like:
Downward sloping MA 200 AND reaching a new 100 day high.
I have no clue how to code the slope, could anyone help?
Something like the below code could spot that pattern: (you can adjust the slope period of the MA200, I set it to 50 periods by default)
avg=average[200]
slopeperiod=50
downward=summation[slopeperiod](avg<avg[1])=slopeperiod
test=downward and high>=highest[100](high)
screener[test]
Thank you Nicolas for the great support!
Much appreciated!