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
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
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.
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.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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
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
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
The indicator seems to ignore this too.
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?
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 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.
How can I get OnDeinit to run after OnCalculate instead of during it?
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.