Different results with same code, same prices, same tester...?!

 

Hi everyone, I've been writing an expert advisor for a while that I tested and optimized using Alpari. But now, I realized that after some time, without any modification to the code, the tester results are different (the original DD was 8%, now more than 40%) even if the dates are the same, the prices are the same themselves and the spread is equal ( 30 ). Comparing the reports, I notice that on one the profits are higher, even if the lots are the same, the entry and exit price and the times all identical! How is it possible? can the mt4 update the historical data or change them, without realizing it?
Thanks everyone, I can't figure it out. Here's a screenshot for you to understand...
First test done recently:


Current test with same MT4:


I know it's a few cents, but when the expert enters the grid, the difference in earnings is substantial. I'm sure the code is the same, I can't figure it out!

 
Different swaps and/or different conversion rate between profit currency and account currency.
 
Alain Verleyen # :
Different swaps and/or different conversion rate between profit currency and account currency .

Does this happen automatically? because the metatrader is the same. I didn't think this could affect that much! from 8% to 40%

 
forextastic #:

Does this happen automatically? because the metatrader is the same. I didn't think this could affect that much! from 8% to 40%

On MT4 the current trading environment is used to get the needed values to convert to the account currency and to calculate the swaps.

MT4 is obsolete, you should use a modern software like MT5.
 
Alain Verleyen #:

On MT4 the current trading environment is used to get the needed values to convert to the account currency and to calculate the swaps.

MT4 is obsolete, you should use a modern software like MT5.

Doesn't this happen in mt5?

And if I imported the historical data into mt4 (for example those of dukascopy) could the results still change over time as happened this time, or being entered by me will it always remain the same?

Thank you for the response Alain.

 
forextastic #:

Doesn't this happen in mt5?

Yes and no.

MT4 is using some values from the living trading environment, like conversion rates or swaps...maybe other things I didn't investigate in depth. MT5 is better but has still some issues because while it uses all historical data for the conversion (good), it is still using the swaps (bad) from the live environment. So in that regards you can still have different results according to the time you run the backtest, but the difference are small (unless your strategy is highly dependent of the swaps rates and there was big changes between your tests). However you can deal with that by using custom (fixed) values if you really need it and you know what you are doing.

In general MT5 is far better, though not perfect for sure.

And if I imported the historical data into mt4 (for example those of dukascopy) could the results still change over time as happened this time, or being entered by me will it always remain the same?

Thank you for the response Alain.

You will have the same issue. It doesn't depend on the data, but on the platform.

 
Alain Verleyen #:

Yes and no.

MT4 is using some values from the living trading environment, like conversion rates or swaps...maybe other things I didn't investigate in depth. MT5 is better but has still some issues because while it uses all historical data for the conversion (good), it is still using the swaps (bad) from the live environment. So in that regards you can still have different results according to the time you run the backtest, but the difference are small (unless your strategy is highly dependent of the swaps rates and there was big changes between your tests). However you can deal with that by using custom (fixed) values if you really need it and you know what you are doing.

In general MT5 is far better, though not perfect for sure.

You will have the same issue. It doesn't depend on the data, but on the platform.

Clear, thank you 💪
Reason: