Thanks for posting your question about MTF moving averages plotted on a chart.
The solution I will provide is the most flexible for all viewers. Which means the chart study will include user adjustable inputs so that anyone can select the Edit Studies window and adjust the length of the moving average, what type of moving average and the time frame.
Using this approach, you can use this code to create a single custom chart study that you can then add to the chart many times. Then adjust each one using the user inputs (do not modify the code).
input maLengthOne = 9;
input maTypeOne = AverageType.EXPONENTIAL;
input timeFrameOne = AggregationPeriod.FIVE_MIN;
plot maOne = MovingAverage(maTypeOne, close(period = timeFrameOne), maLengthOne);
Now I know for certain someone will want to know how to build a signal chart study that contains all the moving averages you listed. I will show you a section of code that displays two moving averages, using two of those time frames as the default value.
input maLengthOne = 9;
input maTypeOne = AverageType.EXPONENTIAL;
input timeFrameOne = AggregationPeriod.FIVE_MIN;
input maLengthTwo = 9;
input maTypeTwo = AverageType.EXPONENTIAL;
input timeFrameTwo = AggregationPeriod.FIFTEEN_MIN;
plot maOne = MovingAverage(maTypeOne, close(period = timeFrameOne), maLengthOne);
plot maTwo = MovingAverage(maTypeTwo, close(period = timeFrameTwo), maLengthTwo);
As you examine this code you will find a pattern. All I did was to copy the code that plots the single moving average. Then changed the name of all the inputs and variables. For example I copied "input maLengthOne" then pasted that and changed the copy to "inputmaLengthTwo". I repeated the process for every input and variable name throughout. Following this pattern you can repeat this process to create a Three, Four, Five or how every many you like.