forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Forum

Forex Software, Forex Strategies, Expert Advisors Generator

You are not logged in. Please login or register.


Forex Forum → Expert Advisor Studio → EAS strategy with MACD has different trades than it's exported EA

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 3

1 (edited by sidmcfarland 2020-05-17 15:52:11)

Topic: EAS strategy with MACD has different trades than it's exported EA

I have a strategy generated by Expert Advisor Studio that includes a MACD crossover entry rule. When I view the journal of trades from this strategy in EAS I see a list of trades. However, when I export this strategy to MQL5 and backtest it on the exact same historical data, MT5 journal shows a different set of trades. There are a few trades MT5 executes which EAS did not. I'm trying to figure out why.

It seems that the MACD entry trigger is not the same in both environments. When comparing journals between EAS and the backtested EA, most of the trades match up perfectly. However, the MT5 EA seems to execute a few additional trades that EAS did not. This leads to MT5 backtest results that are different than EAS backtest results.

Is it possible that MACD in the EAS indicator chart has slightly different values than in MT5 and is not behaving exactly the same way it does in an expert advisor? As stated, the underlying historical data for both is identical.

UPDATE:

I attached a zip file contain three files so that anyone can replicate this issue.

USTECHIndex1.json - The historical data
Strategy Collection 1 USTECHIndex M1.json - The EAS strategy
EA Studio USTECHIndex M1 22212606.mq5 - The exported MT5 EA

Load the historical data into EAS (1), load the strategy into EAS (2), and then view the journal. Notice that at 05/11/2020, 19:36 a long position is opened. Let's call this the "19:36" position. The next position is another long position opened at 05/11/2020, 20:23. Let's call this the "20:23" position.

Now, load the MT5 EA (3) into MT5 and, using the same historical data, backtest the strategy using tick data resolution over a date range that includes 05/11/2020. Note that, as expected, the EA opens both of the positions mentioned above. However, it also opens a position in between them. The EA opens a third position at 05/11/2020, 19:36 a long position is opened. Let's call this the "19:36" position. The next position is another long position opened at 05/11/2020, 20:18 because the MACD entry criteria is met.

In short, it seems the MACD values in the EAS indicator chart are different than the MACD values considered by the expert advisor during backtests. How can this be?

Post's attachments

EAS Files.zip 1.3 mb, 3 downloads since 2020-05-17 

You don't have the permssions to download the attachments of this post.

2 (edited by sidmcfarland 2020-05-17 16:08:13)

Re: EAS strategy with MACD has different trades than it's exported EA

Essentially, the balance chart in EAS doesn't match the balance chart in MT5 for the exact same strategy using the exact same data. See the attached image showing two charts. The upper chart is from Expert Advisor Studio. If I export that strategy and backtest it in MT5 I get the bottom chart. The reason for the discrepancy seems to be related to the MACD entry signal. It's generating more trades in MT5 backtests (169 total trades) than it did in EAS strategy generator (137 total trades).

Post's attachments

Balance.png 30.92 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: EAS strategy with MACD has different trades than it's exported EA

I'm not sure about mt5 backtest reliability, but my first guess would be it. Wasn't it different to mt4? The common verdict is that m4 and EAS do match in their backtests, but I'm no fan of multiple backtests.

Have you compared actual trading results to the backtest results? Do they line up? This is what really counts when the rubber hits the road.

If you're certain that values don't line up, have you verified it by comparing indicator values?

I'm away from that other platform, so at the moment I can't check it out myself.

Posts: 3

Pages 1

You must login or register to post a reply

Forex Forum → Expert Advisor Studio → EAS strategy with MACD has different trades than it's exported EA

Similar topics in this forum