Per the documentation:
"Return Value - Returns true if the command has been added to chart queue, otherwise false. To get error details use the GetLastError() function."
So check your return value and see what the error is. You can view the example code for how that is done here:
Just looking for some coding help.
I designate shortname for indicator I want to be able to delete:
Then for the indicator that will be deleting the one above, code is below.
I assume all I should need to do is to drag the one below to navigator:
My understanding is this is all I need? Doesn't work though.
Note my coding sucks, I've just pieced this together from google, so hoping someone could check if I'm missing anything.
Thanks!
I suppose you used the correct parameter sub_window in the ChartIndicatorDelete() function. In this case try to add ChartRedraw()
#property strict void OnStart() { ChartIndicatorDelete(0,0,"PA"); ChartRedraw(); }
How do I get the output of this to print somewhere? Sorry, I'm very new to this.
Yep, parameters are correct. Active window, main chart. Tried adding that, didn't help.
I noticed terminal says the below when I try to run the indicator that removes:
"Expert '<indicatorname>' is not a custom indicator and will be removed"
I'm confused why it's calling it an Expert, I put it in root/MQL4/Indicators
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Just looking for some coding help.
I designate shortname for indicator I want to be able to delete:
Then for the indicator that will be deleting the one above, code is below.
I assume all I should need to do is to drag the one below to navigator:
My understanding is this is all I need? Doesn't work though.
Note my coding sucks, I've just pieced this together from google, so hoping someone could check if I'm missing anything.
Thanks!