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 aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?


Lovelesh Sharma
CMT, CFTe
Também em:

Aviso legal