How to write a code to screen stocks that are close to moving average

How to write stocks that are close or at the 50/100/200 moving average @Streak @portfolioplus911

There are lots of ways to do this.

What you need to understand is that all SMA/EMAs just like anything else that is plotted is just a number. I have created this for stocks trading within 3% from its 50 SMA.

You can add conditions for 100/200 SMA and play around with the percentage to set a range that you want.

3 Likes

thanks a lot. This was really helpful.

How to join Streak ? Platform looks very interesting to me.

You can visit streak.zerodha.com

thanks a lot for the reply