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

 
If you are debugging a script or an EA and roam around the collstack, a green arrow appears on the left side of the source code, showing which line you are on. If you roam the collstack in different files, for example many different inludes, in fact each open tab with its own file will have a different green arrow. But when I stop debugging, they don't disappear, but stay there. Bug or bug?
 
I don't know if this has already been mentioned in this thread or not. Maybe they will finally make access to all available bars from the tester? I'm really sick and tired of working on 5 minutes to load older TFs over several years through crutches!
 
traveller00:

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

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 is unknown.

To reproduce and fix this error we need an expert in the form of ex5 and optimization conditions.

If it is not a problem for you, please send it to me in a private message. The expert will be irretrievably wiped out after the research

 
Slava:

To reproduce and correct this error, we need an expert in the form of ex5 and optimisation conditions.

If it's not too much trouble for you, then me in a private message. After research the expert will be irrevocably erased

The source code of the Expert Advisor is given in the same post. Just in case, I posted it again below.

The symbol and period, when there were no quotes on it. In my case it is stock exchange, broker Otkritie, symbol UCAD-12.19, period 01.09.2019-03.09.2019.

Genetic optimisation or complete overshoot-doesn't matter. By a single variable test, more passes, put from 0 to 1000000.

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]);
}
 
traveller00:

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

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 is unknown.

Thanks for the message!

The problem has been found and fixed.

 
Anton:

Thank you for your message!

The problem has been found and fixed.

Thank you.

 
There was no downloaded history. Started on all characters.
2019.12.16 16:41:50.787 Tester  Experts\fxsaber\Research\Research03.ex5 on EURGBP,H1 from 2015.01.01 00:00 to 2019.12.16 00:00
2019.12.16 16:41:50.787 Tester  optimization on all MarketWatch symbols started
2019.12.16 16:41:50.790 Core 1  agent process started on 127.0.0.1:3000
2019.12.16 16:41:50.791 Core 2  agent process started on 127.0.0.1:3001
2019.12.16 16:41:50.792 Core 3  agent process started on 127.0.0.1:3002
2019.12.16 16:41:50.793 Core 4  agent process started on 127.0.0.1:3003
2019.12.16 16:41:50.794 Core 5  agent process started on 127.0.0.1:3004
2019.12.16 16:41:50.795 Core 6  agent process started on 127.0.0.1:3005
2019.12.16 16:41:51.145 Core 4  connecting to 127.0.0.1:3003
2019.12.16 16:41:51.145 Core 4  connected
2019.12.16 16:41:51.155 Core 2  connecting to 127.0.0.1:3001
2019.12.16 16:41:51.155 Core 2  connected
2019.12.16 16:41:51.162 Core 4  authorized (agent build 2280)
2019.12.16 16:41:51.162 Core 1  connecting to 127.0.0.1:3000
2019.12.16 16:41:51.162 Core 1  connected
2019.12.16 16:41:51.162 Core 3  connecting to 127.0.0.1:3002
2019.12.16 16:41:51.163 Core 3  connected
2019.12.16 16:41:51.163 Tester  EURGBP: history data begins from 2003.02.06 00:00
2019.12.16 16:41:51.163 Core 4  pass 0 started on EURGBP
2019.12.16 16:41:51.167 Core 4  common synchronization completed
2019.12.16 16:41:51.171 Core 2  authorized (agent build 2280)
2019.12.16 16:41:51.178 Core 3  authorized (agent build 2280)
2019.12.16 16:41:51.178 Core 1  authorized (agent build 2280)
2019.12.16 16:41:51.276 Tester  EURUSD: history data begins from 1971.01.04 00:00
2019.12.16 16:41:51.276 Core 2  pass 1 started on EURUSD
2019.12.16 16:41:51.280 Core 2  common synchronization completed
2019.12.16 16:41:51.476 Core 3  GBPUSD: preliminary downloading of M1 history started
2019.12.16 16:41:51.694 Core 2  EURUSD: history for 2014 year synchronized
2019.12.16 16:41:52.009 Core 2  EURUSD: history for 2015 year synchronized
2019.12.16 16:41:52.351 Core 2  EURUSD: history for 2016 year synchronized
2019.12.16 16:41:52.663 Core 2  EURUSD: history for 2017 year synchronized
2019.12.16 16:41:52.958 Core 2  EURUSD: history for 2018 year synchronized
2019.12.16 16:41:53.080 Core 2  EURUSD: history for 2019 year synchronized
2019.12.16 16:41:53.080 Core 2  EURUSD: history synchronization completed [13567 Kb]
2019.12.16 16:41:53.080 Core 2  EURUSD: 13.25 Mb of history processed in 0:01.778
2019.12.16 16:41:56.077 Core 4  pass 0 on EURGBP returned result 100000.00 in 0:00:04.862
2019.12.16 16:41:57.077 Core 2  pass 1 on EURUSD returned result 100000.00 in 0:00:03.961
2019.12.16 16:42:05.052 Core 3  pass 2 started on GBPUSD
2019.12.16 16:42:05.059 Core 3  common synchronization completed
2019.12.16 16:42:05.276 Core 3  GBPUSD: history synchronization started
2019.12.16 16:42:06.143 Core 4  pass 3 started on AUDCAD
2019.12.16 16:42:06.143 Core 5  connecting to 127.0.0.1:3004
2019.12.16 16:42:06.144 Core 6  connecting to 127.0.0.1:3005
2019.12.16 16:42:06.144 Core 5  connected
2019.12.16 16:42:06.144 Tester  testing on MarketWatch symbols finished, total passes 2
2019.12.16 16:42:06.144 Statistics      optimization done in 0 minutes 16 seconds
2019.12.16 16:42:06.144 Statistics      local 2 tasks (100%), remote 0 tasks (0%)
2019.12.16 16:42:06.144 Core 6  connected
2019.12.16 16:42:06.167 Tester  2 new records saved to cache file 'tester\cache\Research03.all_symbols.H1.20150101.20191216.22.FBC21040E327AF5F62DDA1A545DE091D.opt'
2019.12.16 16:42:06.168 Core 1  connection closed
2019.12.16 16:42:06.168 Core 2  connection closed
2019.12.16 16:42:06.168 Core 3  connection closed
2019.12.16 16:42:06.172 Core 6  authorized (agent build 2280)
2019.12.16 16:42:06.177 Core 5  authorized (agent build 2280)
2019.12.16 16:42:06.349 Core 4  AUDCAD: history synchronization started
2019.12.16 16:42:11.777 Core 3  GBPUSD: history downloading completed
2019.12.16 16:42:11.777 Core 3  GBPUSD: history synchronization interrupted
2019.12.16 16:42:11.777 Core 4  connection closed
2019.12.16 16:42:24.794 Core 4  AUDCAD: history downloading completed
2019.12.16 16:42:24.794 Core 4  AUDCAD: history synchronization interrupted
2019.12.16 16:42:24.794 Core 5  connection closed
2019.12.16 16:42:24.794 Core 6  connection closed
2019.12.16 16:42:24.794 Tester  stopped by user
After the highlighted line, pressed Stop. Terminal entered "Not responding" mode. It hung up after 27 seconds (judging by the log).
 
How do you calculate the number of all errors from a single EX5 run? For example, wrong lot or lack of margin.
 
Bild 2280. It takes a symbol and a period when there were no quotations on it. In this case it is a stock exchange, broker Otkritie, symbol 1MFR-1.20, period 01.09.2019-01.12.2019. Runs any Expert Advisor, say from Examples\Moving Average\Moving Average.ex5. Genetic optimization is set (although I suspect others have this bug as well), criterion makes no difference (no ticks anyway), each tick based on real ticks, profit in pips. We optimize it and get essentially a set of zero passes. Why are profit_factor and margin_level filled with rubbish in each pass? Aren't the variables initialized with zero somewhere? In the backtest tab it just looks like an empty space, it doesn't output anything. If we parse the opt-file by hand, the values are profit_factor = 1.797693134862316e+308 and margin_level = 1.797693134862316e+308.
 
traveller00:
profit_factor = 1.797693134862316e+308 and margin_level = 1.797693134862316e+308.

DBL_MAX