JBroadway

Time Locked Moving Average

JBroadway Updated   
Succinct Description
Generates moving average that stays locked to users desired time preference.

Verbose Description
The default moving average indicator does not stay locked to the chart timeframe. Meaning, if you want to see a 1 day SMA on a 15 minute chart, you have to do math and adjust the moving average length to 96.
Needing to do this constantly (especially while flipping through multiple time frames) was really annoying, so I codded up this script to do it for me... and now it can for you too!

Error Handling
If you receive a 'study error' that says, "function sma references too many candles in history".
Go to the Time Locked Moving Average settings and increase the timeframe interval until error goes away.
Furthermore, UNCHECK gaps, to show real-time approximated moving average values.

Enjoy :)
Release Notes:
Added - WMA, VWMA, and HMA
Added - Slope feature.

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?