Hello folks,
I would like to put a conditional forced exit inside the OnInit() method of an indicator,
something like this:
How can I do it?,
Thank you, Cyberglassed!
Just return(-1) from OnInit. Don't call DeInit() - it will be called automatically.
Thank you marketeer,
when I call "return(-1);" the OnDeinit() method is called (I know it because I debugged), but for some reason
the indicator subwindow (I used: "#property indicator_separate_window" for the indicator) remains there.
I would like the indicator be completeley deleted, even its containing subwindow.
Thanks, Cyberglassed.
![Documentation on MQL5: Chart Operations Documentation on MQL5: Chart Operations](/i/community/logo_mql5_small.png)
- www.mql5.com
Thank you marketeer,
when I call "return(-1);" the OnDeinit() method is called (I know it because I debugged), but for some reason
the indicator subwindow (I used: "#property indicator_separate_window" for the indicator) remains there.
I would like the indicator be completeley deleted, even its containing subwindow.
Thanks, Cyberglassed.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello folks,
I would like to put a conditional forced exit inside the OnInit() method of an indicator,
something like this:
How can I do it?,
Thank you, Cyberglassed!