Simply stop (delete) your indicator on different charts during debugging the EA.
Carl Schreiber #:
Simply stop (delete) your indicator on different charts during debugging the EA.
Simply stop (delete) your indicator on different charts during debugging the EA.
Hi Carl,
Yeah, that is what I am doing. The EA starts a new chart and adds an indicator to the new chart. When I close the new chart (the one with the indicator) using CTRL + F4, I start to see the 4101 errors that I shouldn't be seeing.
After a bit more playing around, I can see that the 4101 errors are actually happening before the OnDeinit() function is called for the indicator.
So, does anyone know what happens between pressing CTRL+F4 and the OnDeinit() being called?
Is there anything that I can hook into?
Can I prevent CTRL+F4?

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
I have an EA that creates an indicator using iCustom()...
When debugging the EA, is there a way to also debug the indicator (or just the indicator)?
I've had a look around, but cannot see how it can be done. I appreciate that they are both separate EXE's, but I was hoping to find some "attach to running process" type ability.
The reason I would like to do this is I am seeing a lot of 4101 errors (Wrong chart ID), when I close the chart associated with the indicator (not the same as the EA chart) by using CTRL + F4.
I'm not sure what stage the code is at, but I don't think OnDeinit() has deleted the chart at the point I am seeing the issues.
I could move all the code to the EA, but that *might* change the dynamics, or I could try to plaster the code with temporary Print() statements, which I'd rather not do.