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

Mã nguồn mở

Theo tinh thần TradingView thực sự, tác giả của tập lệnh này đã xuất bản dưới dạng nguồn mở để các nhà giao dịch có thể hiểu và xác minh. Chúc mừng tác giả! Bạn có thể sử dụng miễn phí. Tuy nhiên, bạn cần sử dụng lại mã này theo Quy tắc nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?


Lovelesh Sharma
CMT, CFTe
Ngoài ra, trên:

Thông báo miễn trừ trách nhiệm