Is there a way that an indicator can remove itself?
I tried ExpertRemove() which worked as far as I remember for mql4 - but mql5 it does not - do I have to force a division by zero or an invalid array access?
Maybe you can apply a template with ChartApplyTemplate function and you will not have any indicator on the chart...
There is also a proper way:
https://www.mql5.com/en/docs/standardlibrary/technicalindicators/cindicators/cindicator/cindicatordeletefromchart
Or just ChartIndicatorDelete();
- www.mql5.com
My indicator doesn't use this library.
So far I use: Print(1.0/(sqrt(1)-1));
This is the built-in function that the function from the library calls:
https://www.mql5.com/en/docs/chart_operations/chartindicatordelete
- www.mql5.com
Yep, I just found it.
hmm - similar things should have similar names that would make live easier!
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Is there a way that an indicator can remove itself?
I tried ExpertRemove() which worked as far as I remember for mql4 - but mql5 it does not - do I have to force a division by zero or an invalid array access?