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

 

Playing the input reset bug during compilation.

EA

input int inRange = 0;

void OnInit() {}

1. set inRange = 25 and run single pass

2. CTRL+V in the Tester Settings tab of the next line

inRange=123

3. Recompile EA.

4. See that the inRange is reset to 25. It should have been 123.

 
Slava:

In the Tester timer or via Sleep shifted by 0.5 seconds. How to identify what happened? TimeTradeServer does not show data of less than a second.

 
fxsaber:

Playing the input reset bug during compilation.

EA

1. set inRange = 25 and run single pass

2. CTRL+V in the Tester Settings tab of the next line

3. Recompile EA.

4. See that the inRange is reset to 25. It should have been 123.

It is not a bug.

As designed. Until the test button is pressed, the current parameters are not written to the current <expert_name>.set

When recompiling, if the composition of the parameters has not changed, their values are restored from the current set

 
Slava:

It's not a bug.

As designed. Until you press the test button, the current parameters are not written to the current <expert_name>.set

When recompiling, if the composition of parameters has not changed, their values are restored from the current set

It's not. If you handwrite 123, the compilation won't change the value.

 
I've alreadywritten on this topic too, but there was no answer. In fact, it becomes impossible to debug with custom parameters. Because debugging rebuilds every time, even if nothing was changed. Rebuild resets the parameters. I will have to get out of the equation by changing the Expert Advisor and nailing the parameters, which is not very convenient.
Новая версия платформы MetaTrader 5 build 2190
Новая версия платформы MetaTrader 5 build 2190
  • 2019.11.25
  • www.mql5.com
В пятницу 18 октября 2019 года будет выпущена обновленная версия платформы MetaTrader 5...
 
Andrey Khatimlianskii:

Something you over-optimised with iTime:


Working on the M5:


This is a long-standing bug.

Appeared on real EURUSD ticks exactly in this testing range

Corrected.

 
traveller00:
I alsowrote on this topic, but there was no answer. As a matter of fact, it becomes impossible to debug with custom parameters. Because debugging rebuilds every time, even if nothing was changed. Rebuild resets the parameters. I will have to get out of the equation by changing the Expert Advisor and nailing the parameters, which is not very convenient.

You didn't say anything about the steps to reproduce the problem you describe.

I personally could not reproduce it.

There is only one case of resetting input parameters to the default ones. When you change the composition of parameters of this EA

 
fxsaber:

Prices in the Terminal history have not been normalised!

Prices for MQ-Demo and MQ-Beta have been normalised as of 12.12.2019.

 

A build of 2280 is used. It takes a symbol and a period when there were no quotes on it. In this case it is stock exchange, broker Otkritie, symbol UCAD-12.19, period 01.09.2019-03.09.2019. A simple Expert Advisor is running (below). If you race it one pass at a time, it's fine, it just says no history, 0 bars and 0 ticks. If I run optimization, it will not matter if it is genetic or full, the log will contain a lot of errors

genetic pass (0, 504) tested with error "critical runtime error 517 in OnInit function (module Experts\test.ex5 exception 0xc0000005)" in 0:00:00.041
input int test=1;

double OnTester()
{
  return 0;
}

void Test(const MqlTick &Tick)
{
}

void OnInit()
{
  MqlTick OldTicks[];
  int OldTicksCount=CopyTicks(_Symbol,OldTicks,COPY_TICKS_ALL);
  while(OldTicksCount>=1000)
    OldTicksCount=CopyTicks(_Symbol,OldTicks,COPY_TICKS_ALL,OldTicks[OldTicksCount-500].time_msc);
  for(int i=0;i!=ArraySize(OldTicks);++i)
    Test(OldTicks[i]);
}

It seems to be a response to access theOldTicks array, but I don't know why. Replacing the function return result with the array size doesn't help. What to do about it, unknown.

 

Build 2280. Why is it that when you run an optimization, e.g. genetic optimization, all fields in the Settings tab become greyed out and cannot be changed, but the field that is being optimized for (like Maximum Custom Criterion) stays active? Can the criterion be changed in the middle of optimization or is it a bug?

P.S. Hm, it doesn't always seem to repeat itself.

P.P.S. Figured out how to repeat. Initially, after running the test, the button does go into a disable state. But I have the lower settings window a bit compressed in height, as a result there' s a vertical scroll. If you scroll up that the criterion is no longer visible, and then scroll back down, you can detect it again yanked down.
Оптимизация стратегий - Алгоритмический трейдинг, торговые роботы - Справка по MetaTrader 5
Оптимизация стратегий - Алгоритмический трейдинг, торговые роботы - Справка по MetaTrader 5
  • www.metatrader5.com
Тестер стратегий позволяет тестировать и оптимизировать торговые стратегии (советники) перед началом использования их в реальной торговле. При тестировании советника происходит его однократная прогонка с начальными параметрами на исторических данных. При оптимизации торговая стратегия прогоняется несколько раз с различным набором параметров...