Thierry Ramaniraka:
Hello,
As I constantly feed my MQL knowledge, I ask you the difference between theese 2 "deinitialization functions" :
It seems that both do the job. What is the "better way" to deinitialize ?
Regards.
https://www.mql5.com/en/forum/213549
Hello,
As I constantly feed my MQL knowledge, I ask you the difference between theese 2 "deinitialization functions" :
It seems that both do the job. What is the "better way" to deinitialize ?
Regards.
what is the diff between : init() deinit() start() vs OnInit() OnDeinit() OnTick()
- 2017.08.15
- www.mql5.com
what is the diff between : init() deinit() start() vs OnInit() OnDeinit() OnTick() ?? tks...
thank you.
Start using the new Event Handling Functions.
Event Handling Functions - Functions - Language Basics - MQL4 Reference
Event Handling Functions - Functions - Language Basics - MQL4 Reference
whroeder1:
Start using the new Event Handling Functions.
Event Handling Functions - Functions - Language Basics - MQL4 Reference
Start using the new Event Handling Functions.
Event Handling Functions - Functions - Language Basics - MQL4 Reference
Hello,
My problem is when I use the classic "deinit" with a button in it to delete it, if i dleete the indicator, each time I change the time frame my button change it's state.
What Event function can make my button keep it's state even if i change the time frame ?
Classic or new are identical. It is you that are deleting and recreating your button, thus loosing state.
- You are changing TFs, everything should be reset.
- No reason to remove the button if the reason if Uninitialization Reason Code is REASON_CHARTCHANGE. Just check if the button already exists before creating it.
- For EAs, just remember the state and use it for recreating. For indicators, save the state in persistent storage (GV or files)
whroeder1:
Classic or new are identical. It is you that are deleting and recreating your button, thus loosing state.
- You are changing TFs, everything should be reset.
- No reason to remove the button if the reason if Uninitialization Reason Code is REASON_CHARTCHANGE. Just check if the button already exists before creating it.
- For EAs, just remember the state and use it for recreating. For indicators, save the state in persistent storage (GV or files)
Ok, thank you very much.
if i look to the MQL example indicators i can not see that OnDeinit()
is used, why is it not used in MQL5 indicators?
No but you can add it if you need it.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
As I constantly feed my MQL knowledge, I ask you the difference between theese 2 "deinitialization functions" :
It seems that both do the job. What is the "better way" to deinitialize ?
Regards.