Matthew Renner: Suppose I wanted to plot a higher timeframe MA?
-
Convert your shift to the HTF shift, get the value from there and plot it.
- Since the source data is a higher TF, you must reprocess all source bar zero values to get the stair step effect, (one source bar, multiple chart bars.)
How to do your lookbacks correctly #9 - #14 & #19

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
I was able to get the iMA( to successfully plot a moving average.
Suppose I wanted to plot a higher timeframe MA?
In the code below, there's an input of choosing a higher timeframe with the variable "TF".
For example, if I wanted to plot the M30 moving average when the indicator is on a M15 chart, what would I need to do differently in the code below?
I'm pretty sure it has to do with iBarShift(, since I've used it in MQL4?
Note: I'm asking more for the concept so I can apply to other built-in indicator functions, not specifically the MA for this indicator.
Thank you.