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

 
traveller00:
Bild 2280, but this was also the case in previous versions. If I run a script or an EA for debugging, a new window of the first symbol from the market overview opens on timeframe 1H. What if I need to debug not on the first symbol or on another timeframe? Is there any way to do it without deleting all symbols to make the right one come first?
Go to the terminal settings. There you can select the symbol to debug.
 
Artyom Trishkin:
Go to the terminal settings. There is a symbol selection for debugging there.

Artyom, you've got it wrong. These are ME settings, not terminal settings.


You need to work less)))

 
Artyom Trishkin:
Go to the terminal settings. There you can select a symbol for debugging.

Got it, thanks. I'm new to MT5, don't know everything yet.

 
Alexey Viktorov:

Artyom, you've got it wrong. These are ME settings, not terminal settings


You should work less)))

Yeah, my mistake... Sometimes when you're writing from a mobile phone, you can't even look...
 

Build 2280. There are 4 processors on the computer. There are 2 MT5s running. First one is running a long script, terminal64.exe is eating 100% of 1 processor, resulting in a total load of 25%. The second MT5 is running genetic optimization. There are 4 agents by the number of processors as standard. First batch of jobs gets all 127. Remaining tasks are received and executed by 2 agents, the remaining 2 hang in finished and not even received. If I force them to disable-enable, they join the job. Until optimization starts again. If you kill first MT5, situation stays the same. If you restart the second MT5 after that, it will be fine. Is this a tricky load balancer or a bug somewhere? If the former, then it's not very good, because it ends up loading at 75% (first MT5+2 agents) and still it should rather be handled by the priorities of the wind.

P.S. Seems not necessarily related to CPU load. Just started genetics only after reboot, nothing else running at all, also 2 agents were lazy until I switched them off/on. If I keep only 3 agents active and disable 1 at all, still 2 are lagging, only 1 is working.

P.P.S. If there are 6 processors, then there are 3.
 

Build 2280. Debugged the indicator, performed step by step in the debugger. On the line

StartTime = iTime(Symbols[0], _Period, Pos + PosAddon);

debugging crashed. Something like critical error, debugging stopped. In the log it says

           crash -->  000000 B7250C38B1 038424 B8000000    add        eax, [rsp+0xb8]
                      000000 B7250C38B8 89442460          mov        [rsp+0x60], eax
                      000000 B7250C38BC 448 B4C2460        mov        r9d, [rsp+0x60]
                      000000 B7250C38C1 49 B8010000000000  mov        r8, 0x1
                                       0000
                      000000 B7250C38CB 488 B542468        mov        rdx, [rsp+0x68]
                      000000 B7250C38D0 48 B9E8DD4220B700  mov        rcx, 0xb72042dde8
                                       0000
                      000000 B7250C38DA 49 FF96580F0000    call       qword near [r14+0xf58]  ; #11037 (terminal64.exe)
        
        00: 0x000000B7250C38B1

It happens again, but rarely. Unknown to me, nothing has changed much between debugging.

 

Build 2280. Exchange, futures market. All history is loaded, but tests are done offline. iBarShift works strangely in indicators. And the same code works fine in the script. Is it a bug or am I missing something?

#property indicator_separate_window

void OnInit()
{
  datetime Time[];
  ArraySetAsSeries(Time, true);
  CopyTime(_Symbol,_Period,0,1,Time);

  int Shift=iBarShift(_Symbol,_Period,Time[0]);
  Print("Symbol="+_Symbol+", Shift="+(string)Shift);

  for(int i=0;i!=SymbolsTotal(true);++i)
  {
    const string SymbName=SymbolName(i,true);
    Shift=iBarShift(SymbName,_Period,Time[0]);
    Print("Symbol="+SymbName+", Shift="+(string)Shift);
  }
}

int OnCalculate(const int rates_total,const int prev_calculated,const datetime& time[],const double& open[],const double& high[],
  const double& low[],const double& close[],const long& tick_volume[],const long& volume[],const int& spread[])
{
  return 0;
}

There is such a code. It essentially runs through all symbols from the market review and yanks theiBarShift. The same code works fine in the script. The indicator produces -1 for all symbols, except for the current one (on the chart of which it is running) with the error that there is no history. At the same time on the second run, it apparently loads the history and already shows it normally.

 
traveller00:

the same code works fine in the script. Is it a bug or am I missing something?

Unlike the script, the indicator works asynchronously - it does not wait for the story to be ready.

 
fxsaber:

Unlike the script, the indicator works asynchronously - it does not wait for the history to be ready.

Well, all the history is there. As I said, it works offline, all the history is already downloaded from the server. Or does it need something else?

 
traveller00:

Well, all the history is there. Like I said, he's working offline, all the history is already downloaded from the server. Or does it need something else?

In theory, of course, you need to bring everything up from cold start. In practice, however, I'm not into indicators, so I can't say for sure.

Reason: