robnorthen:
Hi
It appears that a program's OnInit() and OnDeinit() do not get called if there is an indicator handle opened with ChartIndicatorGet() and not yet released with IndicatorRelease().
My indicators and EAs need to retrieve indicators' buffer data whilst the main indicator/EA is running, hence obtaining the handles once when the program is started seems more efficient.
How can the main indicator/EA detect a timeframe change or program close if OnInit() and OnDeinit() are not called?
My tests have shown that the main indicator program is kept running when a handle is still open, even after the indicator's Chart window is closed.
I have experienced the same problem. Hope some one has a solution.

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
Hi
It appears that a program's OnInit() and OnDeinit() do not get called if there is an indicator handle opened with ChartIndicatorGet() and not yet released with IndicatorRelease().
My indicators and EAs need to retrieve indicators' buffer data whilst the main indicator/EA is running, hence obtaining the handles once when the program is started seems more efficient.
How can the main indicator/EA detect a timeframe change or program close if OnInit() and OnDeinit() are not called?
My tests have shown that the main indicator program is kept running when a handle is still open, even after the indicator's Chart window is closed.