1 (edited by qlchau 2024-05-13 23:58:28)

Topic: High MAX n period Moving Average MTF?

Hello friends,
I am new here.
Please can anyone point me to find a Multi-Time Frame(multi-type SMA EMA HULL MVWAP etc) Moving average indicator that can handle VERY large time series Period settings, as in the well over tens or hundreds of thousands range numbers.
It seems there are different software limitations depending on platform used.
FSB limits us to a range of 0 to 200 max. On MT5 highest I could go was 2000, Trading view allows up to 5000 bars.
I know there is also need for sufficient number of historical data available to calculate properly, but if given ample amounts of bars, one could compute the numbers.

This limitation , if arbitrary programmed, forces us to switch to a higher time frame to get within range but we lose precision of smaller bars data.
There are some indicators that smooth the stepping effects using "artificial' averaging methods or just linearly connects the different points from close to close for example.
I would prefer a more refined way, using the actual bars data from the smaller time frames as basis to calculate the Moving averages of higher time frames.
For example: Assuming an instrument trades 24h,  a 200 MA on Daily time frame would correspond to 4800SMA on H1, or 19200 MA on M15, all the way to 288000 MA on M1 time frames...that's very large, yes, but let's say I want to use a close of the 5 min bar across from 200 Daily MA line? I may be a far distance or far time before Daily bar closes to get the cross number...that's just not taking advantage of intraday information available, or whatever other purpose one may have.

I searched around but couldn't find anything that's already available. Maybe someone can help get a breakthrough with this issue? Mr Footon?  Is this even feasible or what would be the MAX period number a coder could extend their MA design to ? Please?

.mq5/4 , .cs

Re: High MAX n period Moving Average MTF?

You can take the MA source code from the repo and adjust the maximum period value to your liking (then allow FSB to override standard indis and save your modified indi; or make it an outright custom one).
You can make it as high as you want but you have built-in FSB limitation - 200k bars max, so that will limit your max value considerably. There was a hack how to increase max bars FSB uses, but I can't find it at the moment.
Taking into account the limits, then somewhat reasonable max period limit would stay at 100k because you need data to test on as well, right. And yet another "but" - you are left with 100k of M1 data, which is ~69 days, which is too little.
Lastly, I'm not very optimistic about mt's capabilities to handle EA's with indis with such large period numbers.
You have to think if these are the right tools for you!

Re: High MAX n period Moving Average MTF?

Thank you very much, Sir.
I will look into doing what you've suggested. I think there are small workaround these need for enormous history data.
I'd say, for example, trying to go to the nearest higher time frame for what is needed.
A 200ma on Daily is of course too much for the 1min time frame to represent and display, so the next reasonable higher time frame where you could have a workable number that is still better than Daily bars would be n(H1)=4800 period or maybe 19200 M15 and then apply smoothing, I guess. We could work a multi Time frame strategy using those instead. That's where I am at in my trading setups. It's just a matter of accuracy for me. No big deal anyway.
FSB is great for putting strategies together and testing them in a flash. But the more detailed aspects of strategy building seems to be missing for sake of simplicity and ease of use. Still exploring its full features though.
Again, Thank you !