This allows you to plot a moving average on a different timeframe to the one you are viewing.
For instance if you are on a 4hr chart, you can plot the position of the daily 200MA, 100EMA etc
On a 15min chart you could plot where the hourly MAs are.
You can define the length of the MA and the style, EMA, SMA Hull MA etc, the colour and the type.
As with all my scripts I have pinched bits of other peoples and spliced them together with my own bits and bobs. Credit where it's due but I don't even know where most of this came from, it's pretty bothed together.
Feedback appreciated