Wrong Strategy Tester results

 

I am doing optimization test and it gives me some wrong results. If I run single tests of the marked passes the result is far away from the shown on the optimization. But there are other passes that are not marked as red, they are correct. So why some passes show wrong results and others show correct results?


 
Dmitry ZhakovI am doing optimization test and it gives me some wrong results. If I run single tests of the marked passes the result is far away from the shown on the optimization. But there are other passes that are not marked as red, they are correct. So why some passes show wrong results and others show correct results?

Hi Dmitry,

depending on the type of modelling (OHLC M1, real ticks, etc) and the type of strategy the results as you indicate can be mostly wrong.

Please check the following link where it is described how ticks are processed in different types of modelling. 

https://www.metatrader5.com/en/terminal/help/algotrading/tick_generation

There are ways through coding to minimise erroneous optimisations, such as making the EA open/close trades on the opening of a new candle after receiving the entry signal or after reaching a TP/SL so that the EA is not as sensitive as for example using ticks.

In short; it is not a fault or problem with the strategy tester, it is the very nature of the data and how it is modelled. It is very important to understand how this works in order to code an EA accordingly and not waste time with optimisations that may not actually be valid.

Real and Generated Ticks - Algorithmic Trading, Trading Robots - MetaTrader 5 Help
  • www.metatrader5.com
Ticks are required for testing and optimizing Expert Advisors, because they use tick data for operation. Testing can be performed on real ticks...
 
Dmitry Zhakov:

I am doing optimization test and it gives me some wrong results. If I run single tests of the marked passes the result is far away from the shown on the optimization. But there are other passes that are not marked as red, they are correct. So why some passes show wrong results and others show correct results?


Is this a local optimization or using network/Cloud ?

What are the results for these "wrong" passes when run as single tests ?

 
Alain Verleyen #:

Is this a local optimization or using network/Cloud ?

What are the results for these "wrong" passes when run as single tests ?

Running single test the result (profit) is about 50k USD. And not 100k+ as shown on optimization table for the "wrong" passes. 


Today I used another MT5 terminal (brand <deleted>), but logged to the same broker (<deleted>). And I run a single test. Following glitch happened:

How is it possible, and how to fix?

I am always running tests based on real ticks (Every tick based on real ticks).

 
Dmitry Zhakov #: Today I used another MT5 terminal (brand <deleted>), but logged to the same broker (<deleted>). And I run a single test. Following glitch happened:

Forum on trading, automated trading systems and testing trading strategies

Low quality of history in Strategy Tester

Miguel Angel Vico Alba, 2023.07.20 02:48

Hi Dmitry,

the price history is provided by the broker, i.e. it is the broker who decides which dates to offer. There are brokers who extend the price history on request, but it is not common.

My recommendation is that if you find this data "too poor", switch to another broker or as I said before, try contacting them and see if they would be so kind as to provide you with a wider range of data.

And please avoid naming broker names here on the forum (they are considered advertising).

Thank you!

Second warning.

 
Dmitry Zhakov #:

Running single test the result (profit) is about 50k USD. And not 100k+ as shown on optimization table for the "wrong" passes. 


Today I used another MT5 terminal (brand <deleted>), but logged to the same broker (<deleted>). And I run a single test. Following glitch happened:

How is it possible, and how to fix?

I am always running tests based on real ticks (Every tick based on real ticks).

Probably an issue with the data. It's hard to say without any technical details.

Can you provide the Tester Journal log ?

 
Alain Verleyen #:

Probably an issue with the data. It's hard to say without any technical details.

Can you provide the Tester Journal log ?

In the journal log I found the issue:

2023.07.20 14:49:28.841 Core 001 2021.07.20 18:01:41   market buy 1 AUDCHF sl: 0.67443 (0.00000 / 0.67507)

How is it possible that the rate is 0.00000?

 
Dmitry Zhakov #:

In the journal log I found the issue:

2023.07.20 14:49:28.841 Core 001 2021.07.20 18:01:41   market buy 1 AUDCHF sl: 0.67443 (0.00000 / 0.67507)

How is it possible that the rate is 0.00000?

It's obviously a data issue. Hard to say more, it would need to be investigated if it's an MT5 bug or bad data provided by the broker...or something else.

What MT5 build are you using ? Do you have enough free space on your hard disk ?

If you open a chart on this symbol, at that time, all seems ok ?

 
Alain Verleyen #:

What MT5 build are you using ? Do you have enough free space on your hard disk ?

There is more than enough free space on my hard disk. 

I did another test (changed the date period) and now same error on another pair:

Core 001 2021.08.02 17:59:41   market sell 1 AUDJPY sl: 80.785 (0.000 / 80.584)

MT5 Build 3802


If I open the chart then all seems okay.

I want to add also that my EA is placing trades on different pairs.