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 :)