Reply

MT4 backtest wrong results

13 replies

Ilya

Customer, bbp_participant, community, 105 replies.

Visit profile

5 years ago #235405

Hi,

I hope it’s not a too-difficult question, but I have been struggling with this problem for a few days straight now and it is holding me back, I hope someone can assist..

I’ve generated an EA on SQ3 which gave good stables results on 15 years of Data, robustness etc. Before going live, and after a small WFM, I am trying to run a retest on MT4, but the results are very different. I run both backtests on dukascopy tick data, same date range (I tried the range of 1.09.2012 – 1.09.2018 for backtest verification), and the timezone is correct (since other EAs seem to yield identical results).

in SQ3, this date range yields 240 trades, while mt4 yield 55 trades. Journal doesn’t seem to have any errors, “results” tab seem to indeed skip trades, some orders are opened but aren’t executed (I’ve tried with 0 spread also so that’s not the issue, since it’s the exact same data), some orders stay pending much longer than in SQ3 backtest and some just aren’t opened. Some of them are fine though. Going through the code, I’ve tried to change “modifyinsteadofrreplacing” to false (Since there’s an exit rule that states exit after 31 bars, and modification doesn’t change that initial rule), but that didn’t help.

I’m lost as to what’s the lack of correspondence here.. yes this EA isn’t the most simple “MA cross” EA, it uses stoch, pivots, ichimoku etc, but since SQ works on the mt4 engine, I’d expect the results to coincide..

I’m attaching a zip that contains the STR, MQL4 and the code itself in a text file.. with the hope that someone has the will to take a look.

Much appreciated

 

 

 

Attachments:
You must be logged in to view attached files.

0