This moving average script displays the chosen 5 daily moving averages on intraday (minute) charts. It automatically adjusts the intervals to show the proper moving averages.
In a day there are 375 trading minutes from 9:15 AM to 3:30PM in Indian market. In 5 days there are 1875 minutes. For other markets adjust this data accordingly.
If 5DMA is chosen on a five minute chart the moving average will use 375 interval values (1875/5 = 375) of 5minute chart to calculate moving average. Same 5DMA on 25minute chart will use 75 interval values (1875/25 = 75).
On a 1minute chart the 5DMA plot will use 1875 interval values to arrive at the moving average. Since tradingview only allows 5000 intervals to lookback, if a particular daily moving average on intraday chart needs more than 5000 candle data it won't be shown. E.g 200DMA on 5minute chart needs 15000 candles data to plot a correct 200DMA line. Anything less than that would give incorrect moving average and hence it won't be shown on the chart.
MA crossover for the first two MAs is provided. If you want to use that option, make sure you give the moving averages in the correct order.
You can enhance this script and use it in any way you please as long as you make it opensource on TradingView. Feedback and improvement suggestions are welcome.
Special thanks to JohnMuchow for his moving averages script for all timeframes.
진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.