Ok, after some additional research I found out it is impossible to backtest multiple currencies with MT4.
I tried with MT5 and it works fine.
Issue resolved.
Thank you,
Best posts made by vhager
-
RE: Multi symbol EA crashposted in Questions & Answers
Latest posts made by vhager
-
Set current market block not working properlyposted in Bug Reports
Hi,
As I have run out of ideas investigating this issue, I think this might be due to a bug, so I would like to file a bug report.
Please see below the post where I explain about the issue:https://fxdreema.com/forum/topic/16582/mt5-backtest-set-current-market-block
Could somebody please look into it?
Thank you in advance,
Valentin -
RE: MT5 backtest Set current market blockposted in Questions & Answers
I also tried to start in 2022/02/01 and the result is the same, until the 2022/02/09 the results are not correct
-
RE: MT5 backtest Set current market blockposted in Questions & Answers
@roar Thanks for your help. I copied the "set current market block" and all the blocks under, in the init tab, but it gives the same result.
Some pairs are still loaded successfully so I'm not sure it's the a data history issue.It seems more like an index error in the loop of the "set current market block".
I tried to add the a "job done" message at the exit of the block:

But the message "job done" is displayed for the first time on the 2020/01/10

After that it is displayed correctly.
-
RE: MT5 backtest Set current market blockposted in Questions & Answers
Thank you for your replies.
Yes there is data for those pairs, I can go all the way back to the years 2000s
It seems the EA is struggling when the tester is still synchronizing all the symbols..If it is a bug, how to fix it ?
-
MT5 backtest Set current market blockposted in Questions & Answers
Hi,
I'm trying to make a single EA work on multi symbols in backtest mode with MT5.I'm using the Set "Current market" block but the results are unexpected.
In this example, I want to print in the journal the values of the ATR day by day for 28 pairs.
https://fxdreema.com/shared/we46piTge
However, at the beginning of the execution there is an issue:
I'm running from 2020/01/01.
In the screenshot below, on the 2020/01/02 AUDCAD, AUDCHF, AUDJPY, AUDUSD are printed.
But then the EA continues to the 2020/01/03 and prints from CADCHF up to EURAUD only and then skip again to 2020/01/06 without printing the remaining other pairs.
Then after awhile, all the pairs are printed correctly:

Any idea what is causing this ?
Thank you for your help.
Valentin -
RE: Multi symbol EA crashposted in Questions & Answers
Ok, after some additional research I found out it is impossible to backtest multiple currencies with MT4.
I tried with MT5 and it works fine.
Issue resolved.
Thank you, -
Multi symbol EA crashposted in Questions & Answers
Hi,
I'm trying to build a multi symbol EA.
I want to create an EA that will loop on multiple pairs, check indicators and values of each pairs and create trades accordingly.
However, when I try the "buy now" block on a different pair, it crashes and gives me a "zero divide" error.Here is an example:
https://fxdreema.com/shared/6yS9injAdIf this EA is assigned to the EURUSD pair, then it will crash with the following error:

Line 5094 is this one:

I tried without the "set market" block, but the result is the same.
Any idea how to solve this ?
Thank you in advance,
Valentin -
RE: Every n bars pass once at the start when it shouldntposted in Bug Reports
Hi,
Thank you both for your help.
I'm indeed passing by this bug with the use of variables.How to contact the admin ? do they fix this kind of bugs ?
-
RE: Every n bars pass once at the start when it shouldntposted in Bug Reports
Hi,
Thank you for your reply.Yes I understand about the on tick tab, that it will trigger only if there is a tick happening, in this case, I'm using EURUSD on regular hours, so I'm pretty sure, there will be at least one tick on the 1 minute chart.
This example is merely just to show about the block Every "n" bar.My expectation, is this block shouldn't pass until "n" bars have been detected, right? To demonstrate that, i ran a small EA:
If i set n = 2, then it should not pass on the first bar, because the block only detected one bar (the bar where it was executed), then when the next bar arrives, on the tick event, the block now counts a second bar, and now it should pass.
This is confirmed in the log, as you can see the EA passes every two bars.The issue I have is why the block Every N bars, passes as soon as the EA is executed for the first time. It hasn't detected two bars yet, so it shouldn't pass.
If you see the log, at 12:24:30.484 the EA is initialized, then at 12:24:30.546 the message "2 bars counted" is displayed. This message shouldn't appear, as two bars should not have been detected.That's why i think there is a bug in the Every N bars block.
-
Every n bars pass once at the start when it shouldntposted in Bug Reports
Hi,
I'm using the block Every "n" bars in my project, and it seems the first time it is executed, it will pass no matter the number of bars. I use it in live mode not in backtest mode.
After that, if it is executed again, then it seems to work as expected.Here is a little test i made:
https://fxdreema.com/shared/RAe5HW65cThe EA displays a message "2 bars counted" every 2 bars.
I ran it on the 1M chart, and as you can see, the message is displayed as soon as the EA is started.
Then the message is displayed every 2 minutes as intended.
When i check the code, it seems the value bartime is set to 0, therefore this condition will always set pass to true:

Does it work as intended or am i mistaken somewhere? Can you fix this ?
Thank you in advance,
Valentin