Errors, bugs, questions - page 1538

 

Dear developers.

Build 1281 MT5 Windows 7 64

got an update today


The process seems to be endless :-)

After restarting it wants to restart again and so on.

2016.03.30 10:33:31.903 Network '3143179': trading has been enabled - netting mode

2016.03.30 10:33:31.903 Network '3143179': terminal synchronized with MetaQuotes Software Corp.

2016.03.30 10:33:31.829 Network '3143179': previous successful authorization performed on 2016.03.30 10:33:05

2016.03.30 10:33:31.829 Network '3143179': authorized on MetaQuotes-Demo via Access Point EU Frankfurt (ping: 70.19 ms)

2016.03.30 10:33:31.759 LiveUpdate new terminal build 1286 (IDE: 1286, Tester: 1286) is available

 
Vladislav Andruschenko:

Dear developers.

Build 1281 MT5 Windows 7 64

got an update today


The process seems to be endless :-)

after rebooting wants to reboot again and so on

2016.03.30 10:33:31.903 Network '3143179': trading has been enabled - netting mode

2016.03.30 10:33:31.903 Network '3143179': terminal synchronized with MetaQuotes Software Corp.

2016.03.30 10:33:31.829 Network '3143179': authorized on MetaQuotes-Demo via Access Point EU Frankfurt (ping: 70.19 ms)

2016.03.30 10:33:31.759 LiveUpdate new terminal build 1286 (IDE: 1286, Tester: 1286) is available

Bring the full logs.
 
2016.03.30 10:48:54.402 Network '3143179': trading has been enabled - netting mode
2016.03.30 10:48:54.402 Network '3143179': terminal synchronized with MetaQuotes Software Corp.
2016.03.30 10:48:54.301 Network '3143179': previous successful authorization performed from  on 2016.03.30 10:33:30
2016.03.30 10:48:54.301 Network '3143179': authorized on MetaQuotes-Demo through Access Point EU Frankfurt (ping: 70.19 ms)
2016.03.30 10:48:54.230 LiveUpdate      new terminal build 1286 (IDE: 1286, Tester: 1286) is available
2016.03.30 10:48:54.021 MQL5.community  activated for 'Vladon', balance: 98.50
2016.03.30 10:48:53.122 Terminal        G:\РАБОТА\expforex\!!!$$$---MQL5---!!!\ROBOFOREX MT5
2016.03.30 10:48:53.122 Terminal        Windows 7 Ultimate (x64 based PC), IE 11.00, Intel Core i7-6700  @ 3.40 GHz, RAM: 21297 / 32684 Mb, HDD: 9730 / 1498122 Mb, GMT+02:00
2016.03.30 10:48:53.115 Terminal        MetaTrader 5 - RoboForex x64 build 1281 started (ROBOFOREX LP)
 
Vladislav Andruschenko:
These are not complete logs. Write to servicedesk.
 
comp:

Is it true that when an indicator is removed manually while OnCalculate is running, OnDeinit is executed immediately, sometimes simultaneously with OnCalculate, which has not finished yet?

That seems to be the case. A class has a dynamic array of instances of another class which is released in the destructor.

The destructor is called only in OnDeinit through delete.

So, when I uncheck it during OnCalculate, the array mentioned above starts to clear itself, as if someone called the destructor. This someone - OnDeinit.

As a result, I will get NULL instead of instances of the class.

I tried to use _StopFlag in OnCalculate, but it won't help.

How to make OnDeinit run not during the execution of OnCalculate but after?

If I remove delete from OnDeinit I stop getting NULL. But in log I get a logical leaked memory. So it is certainly OnDeinit. I tried to put Sleep in it. But it seems that Sleep doesn't work in indicators. I even tried it like this

  void MySleep( const uint Pause ) const
  {
    const uint StartTime = GetTickCount();
    
    while(GetTickCount() - StartTime < Pause)
      ;
      
    return;
  }

The indicator seems to ignore this too.

 
comp:

I use predefined macros when debugging. Is it also possible to conveniently find out who called the function/method without passing the relevant parameter to it?

You cannot use the built-in MQL tools, you have to do it yourself, for example, for debug version add the "called function name" parameter
 
comp:

This seems to be the case. The class has a dynamic array of instances of another class, which is released in the destructor.

Destructor is called only in OnDeinit via delete.

So, when I uncheck it during OnCalculate, the array mentioned above starts to clear itself, as if someone called the destructor. This someone - OnDeinit.

As a result, I will get NULL instead of instances of the class.

I tried to use _StopFlag in OnCalculate, but it won't help.

How to make OnDeinit run not during the execution of OnCalculate but after?

If I remove delete from OnDeinit I stop getting NULL. But in log I get a logical leaked memory. So it is certainly OnDeinit. I tried to put Sleep in it. But it seems that Sleep doesn't work in indicators. I even tried it like this

The indicator seems to ignore this too.

Please open a request to servicedesk and give the code of OnDeinit function
 
Ilyas:
Please open a request to servicedesk and give me the code of OnDeinit function

Can you recommend how to artificially make OnCalculate run for a long time? It's a bummer with slip.

It's playing only in complex indicator (a lot of calculations). When I remove the calculations - everything is fine, as OnCalculate is executed almost instantly.

 
comp:

How can I get OnDeinit to run after OnCalculate instead of during it?


OnDeinit is always executed after OnCalculate
 
comp:

Can you recommend how to artificially make OnCalculate run for a long time? It's a bummer with slip.

It's playing only in complex indicator (a lot of calculations). When I remove calculations - everything is fine, because OnCalculate is executed almost instantly.

#import "kernel32.dll"
    void Sleep(uint);
#import



 kernel32::Sleep(10000);