MetaTrader 5 Strategy Tester: bugs, bugs, suggestions for improvement - page 58

 

The tester on the custom symbols has stopped working correctly. Playback.

Create symbol.

Forum on trading, automated trading systems and trading strategies testing

MetaTrader 5 Strategy Tester: bugs, bugs, suggestions for improvement

fxsaber, 2020.02.11 01:58

sinput datetime inDateFrom = D'2020.01.01';

void OnStart()
{
  const string Name = "USDJPY_CUSTOM";                                                       // Имя кастомного символа
  const string SymbOrig = "USDJPY";                                                          // Имя оригинального символа

  MqlTick Ticks[];
  
  const int Size = CopyTicksRange(SymbOrig, Ticks, COPY_TICKS_ALL, (long)inDateFrom * 1000); // Считали USDJPY-тики.
    
  if ((Size > 0) && CustomSymbolCreate(Name, NULL, SymbOrig) && SymbolSelect(Name, true))    // Создали символ на основе USDJPY.
    CustomTicksReplace(Name, 0, LONG_MAX, Ticks);                                            // Поместили в него историю USDJPY.        
}


In the Strategy Tester (standard mode, not by pips) start this Expert Advisor

#include <MT4Orders.mqh> // https://www.mql5.com/ru/code/16006

#define  Ask SymbolInfoDouble(_Symbol, SYMBOL_ASK)

void OnTick()
{
  static long Ticket = -1;
  
  if (Ticket == -1)
    Ticket = OrderSend(_Symbol, OP_BUY, 1, Ask, 0, 0, 0);
}

having set the currencies equal to the account currency.


After that we will see the deal profit.


The profit is 100 times higher than it should be. This did not happen on earlier builds.

Search string: Oshibka 003.
 

Forum on trading, automated trading systems and trading strategy testing

MetaTrader 5 Strategy Tester: bugs, bugs, suggestions for improvement

fxsaber, 2020.01.28 14:07

This is the first time I have encountered a situation with my EA where GA result does not coincide with a single pass. All the passes are different.

Full brute force result is the same. Build 2305.


I have a feeling that in opt at genetics the input parameters of each pass are not written quite correctly.

The situation repeated itself. It's hard to imagine how to figure out the reasons.

 
fxsaber:

The situation has repeated itself. It's hard to see how to figure out the causes.

There are parameter values in the optimisation result line.

In a single test the parameter values are necessarily displayed in the tester log.

Do the values in the optimisation result line and in the tester log match?

 
Slava:

Parameter values are present in the optimisation result bar.

If a single test is performed, the parameter values are necessarily output in the tester log.

Are the values in the optimization result line and in the tester log coincident?

They do match. This is the first thing I checked. I'll try to pull the GA passes through the frames. And then compare with what the single shows.

I have a suspicion that input parameter string is formed incorrectly. I.e. I made a pass for one set, but mistakenly prescribed another set in opt.


ZZZ did not manage to reproduce the history on a small interval.

 

The strategy tester checks the original symbols and custom symbols for correctness (matching bars and ticks) differently when preparing the data before the pass.


We create a custom symbol, there is not a single error. Then we make this same data server-side. And Tester says the data is one big error.

One more reason to run the tester only on custom symbols.

 
fxsaber:

Then we make that same data the server data. And Tester says the data is one big error.

Maybe there is a problem with the format after all?

 
Andrey Khatimlianskii:

Maybe there is a problem with the format?

Checked this point. Full match, including tick volume, spread, etc.

 
fxsaber:

Checked this point. Full match, including tick volume, spread, etc.

Must be a protection. So they don't tuck in anything.

 
Andrey Khatimlianskii:

Probably protection. So they don't tamper with anything.

It's just that the data of the original symbol matches perfectly with the custom one. But the custom one passes without errors, while the original one does not.

On one real server I encountered a situation where the same tick volume of original symbol is somewhat different from what is in tick history.

And there it's better not to use Tester at all on original symbols. Otherwise you might run into generated ticks instead of real ones.

 
fxsaber:

The situation has repeated itself. Hard to imagine how to sort out the causes.

Forum on trading, automated trading systems and strategy testing

MetaTrader 5 Strategy Tester: bugs, bugs, suggestions for improvement

fxsaber, 2020.01.28 14:07

This is the first time I have encountered a situation with my EA where GA result does not coincide with a single pass. All the passes are different.

Full brute force result is the same. Build 2305.


I have a feeling that in opt during genetics the input parameters of each pass are not written quite correctly.

Slava:

There are parameter values in the optimization result line.

In single test the parameter values are necessarily written in the tester log.

Are the values in the optimization results line and in the tester's log coincident?

I had a similar situation too, tried to analyze it and it turned out this way,

Parameters in the optimization result line are correct and coincide with those in the tester's log, but the Expert Advisor starts testing with different parameters.

I rebooted the terminal and deleted all caches but optimizing parameters were not applied to the Expert Advisor anyway. Perhaps, antivirus or firewall have blocked something.

Then it somehow resolved itself and started working normally. Check if your firewall is blocking something too.