OPEN-SOURCE SCRIPT

nse sectors % distance From MA

Indicator to measure Distance in % from the MA to visualize Mean reversion in short term or sector rotation to identify winners in long term
Idea is taken from pinescript community and implemented in NSE Indices available on tradingview.

About the concept -
"the moving average is an indicator of price extreme. Because the moving average is a mean, any reversion to the mean will tend to approach the moving average. For trading purposes, this reversion is sometimes profitable when the current price has deviated substantially from that mean or moving average. Price has a tendency to return to the mean. Thus, a deviation from the moving average is a measure of how much prices have risen or fallen ahead of their usual central tendency, and being likely to return to that mean, this deviation then becomes an opportunity to trade with and against the trend. As always, trading against the trend is dangerous and requires close stops, but the reversion also provides an opportunity to position with the trend when it occurs. In addition, when prices continue substantially away from the trend, they are often signaling that the trend is changing direction"

Fun Fact - This indicator is an outcome of boring trading day when market was down 5th consecutive day. Trading should be boring.

thanks
Love Sharma, CMT, CFTe
Detrended Price Oscillator (DPO)educationalExponential Moving Average (EMA)nseindiapricetomasector_analysissectoranalysis

Script de código abierto

Siguiendo fielmente el espíritu de TradingView, el autor de este script lo ha publicado en código abierto, permitiendo que otros traders puedan entenderlo y verificarlo. ¡Olé por el autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la reutilización de este código en la publicación se rige por las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

¿Quiere utilizar este script en un gráfico?


Lovelesh Sharma
CMT, CFTe
También en:

Exención de responsabilidad