Why is the function "OnDeinit(...)" of an Expert Advisor in the new Build - 772 - not executed? Some problem?
- www.mql5.com
It's no answer. "OnDeinit()" must work. With Build 770 didn't work too. Without "OnDeinit()" you can't clean the chart when you remove an indicator or an expert advisor (as reported in the comment
10793, as you said), but also you can't delete some dynamic pointer you have used in the Expert Advisor, and you get a memory leak!
It's no answer. "OnDeinit()" must work. With Build 770 didn't work too. Without "OnDeinit()" you can't clean the chart when you remove an indicator or an expert advisor (as reported in the comment
10793, as you said), but also you can't delete some dynamic pointer you have used in the Expert Advisor, and you get a memory leak!
I have an Indicator that has a working OnDeinit() in build 770, I know it works because the Objects I placed on the chart are removed when I remove the Indicator.
Perhaps it's another UAC issue, what Operating System are you using ? and what folder do you have MT5 installed in ?
I have an Indicator that has a working OnDeinit() in build 770, I know it works because the Objects I placed on the chart are removed when I remove the Indicator.
Perhaps it's another UAC issue, what Operating System are you using ? and what folder do you have MT5 installed in ? "
My problem are the Expert Advisors; when I remove them ( or they finish testing on the Strategy Tester ), the objects are not removed and the memory for the dynamic pointers is not deleted.
My OS is Windows 7. MT5 ("terminal.exe") is installed in C:\Programms\MetaTrader5. The EAs are in C:\User\...\AppData\Roaming\MetaQuotes\Terminal\...\MQL5\Experts. I find it's a problem with
the MT5 Builds, because the OnDeinit() of the Expert Advisors was sooner executed properly. (the UAC is disabled).
Try to recompile source in 772 build.
int OnInit() { Print("Init"); return(0); } void OnDeinit(const int reason) { Print("Deinit"); } void OnTick() { Print("Tick"); }
Journal:
2013.02.21 23:50:44 Empty (GBPUSD,H1) Deinit 2013.02.21 23:50:43 Empty (GBPUSD,H1) Tick 2013.02.21 23:50:42 Empty (GBPUSD,H1) Tick 2013.02.21 23:50:38 Empty (GBPUSD,H1) Tick 2013.02.21 23:50:38 Empty (GBPUSD,H1) Init
Try to recompile source in 772 build.
Journal:
In a new MQ Demo account (with Build 772) is now every file under the programm folder (C:\Programms\MetaTrader5), and OnDeinit() of the Expert Advisors (after new compiling) is now also properly executed! Thanks!
- www.mql5.com
In a new MQ Demo account (with Build 772) is now every file under the programm folder (C:\Programms\MetaTrader5), and OnDeinit() of the Expert Advisors (after new compiling) is now also properly executed! Thanks!
It was most probably a UAC issue so installing in C:\Programms\MetaTrader5\ was probably what fixed the issue.
If anyone else wants to try Renat's test code here it is:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Why is the function "OnDeinit(...)" of an Expert Advisor in the new Build - 772 - not executed? Some problem?