After using the indicator handle you should release it like this:
int sn=ChartIndicatorGet(0,0,shortname); if(sn==INVALID_HANDLE) Print("fff"); else IndicatorRelease(sn);
After using the indicator handle you should release it like this:
Right but a ghost indicator in a managed environment is a bug. Isn't ?
It has been manualy removed from the chart but it still working in symbol thread because it has one active reference to itself
This is the reason why ChartIndicatorGet returns error (indicator is absent on the chart)
Who should remove reference ?
Right but a ghost indicator in a managed environment is a bug. Isn't ?
Well, the documentation does say you must remove it when you are done using it.
(from https://www.mql5.com/en/docs/chart_operations/chartindicatorget)
//--- You should obligatorily release the indicator handle when it is no longer needed IndicatorRelease(handle);
Right but a ghost indicator in a managed environment is a bug. Isn't ?
I use this ghost-mode.
Ilyas:
It is reference to itself
It has been manualy removed from the chart but it still working in symbol thread because it has one active reference to itself
This is the reason why ChartIndicatorGet returns error (indicator is absent on the chart)
Who should remove reference ?
It is a bug in the mql code of course.
The problem is if I am using someone else ex5 and such error arise, I am stuck with it.
MT5 platform should manage it, the same way you don't allow array out of range or invalid pointer.
After using the indicator handle you should release it like this:

- 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 everybody,
here is simply test codes for an indicator,
you can put it in a chart as indicator, but when you remove it from chart, the string "fff" comes up as loop, it don't stop even the chart was closed !! What's wrong of it? Is it a bug?
Thank you for reply.