Hi, I converted the Battleplan indicator (found in the network) from MT4 to MT5 successfully, but I still have a problem.
The diffulty I enconter is to do the indicator in MT5 to paint the battleplan for future time date. In MT4 the indicator paint the battleplan even for future data, in MT5 if I try to do the same I get array out of range.
I attach both the MT4 code and MT5 code.
I even tried to resize both array (time & Hurst) with an appropriate dimension but I get the same error
Here are the changes i tried in MT5 version but without success
//ArraySetAsSeries(time,true);
//ArraySetAsSeries(Hurst,true);
......
ArrayResize(Hurst,limit+(int)cyclelength);
ArrayResize(time,limit+(int)cyclelength);
for( i=limit+(int)cyclelength; i>=0; i--) {
........
Hurst[rates_total-1-i]=(cycle+b+10)*((sup-inf)/15)+inf;
........
My question is:
Is there any way to get the same behaviour in MT5 and MT4 version of the indicator?If you remove the flag condition, then it works
What you have to check are the values (which are obviously not correct)
Sorry for confusion, but what I need is to translate in MT5 is this one:
As you can see in the picture the indicator in mt4 draw the battlepla also for future data (the battleplan is shifted in the future of "cyclelength" period ). How can I get the same in Mt5?
Regards,
Giovanni
Hi Giovannni, I tried installing the battlepan indicator on my mt4 but it does not work. I see nothing, maybe something wrong. can you give me any advice? thank you
Check for errors in the logs.
Also you may want to add #property strict directive in front of the source code, recompile it, and try again - this can help to pinpoint possible problems.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi, I converted the Battleplan indicator (found in the network) from MT4 to MT5 successfully, but I still have a problem.
The diffulty I enconter is to do the indicator in MT5 to paint the battleplan for future time date. In MT4 the indicator paint the battleplan even for future data, in MT5 if I try to do the same I get array out of range.
I attach both the MT4 code and MT5 code.
battleplan.mq5
battleplan_ciclo_4_tempi.mq4
I even tried to resize both array (time & Hurst) with an appropriate dimension but I get the same error
Here are the changes i tried in MT5 version but without success
//ArraySetAsSeries(time,true);
//ArraySetAsSeries(Hurst,true);
......
ArrayResize(Hurst,limit+(int)cyclelength);
ArrayResize(time,limit+(int)cyclelength);
for( i=limit+(int)cyclelength; i>=0; i--) {
........
Hurst[rates_total-1-i]=(cycle+b+10)*((sup-inf)/15)+inf;
........
My question is:
Is there any way to get the same behaviour in MT5 and MT4 version of the indicator?