How to remove the objects created to the indicator closed

Back to topics list To post a new topic, please log in or register
avatar
1
Nailgt 2016.02.28 09:27
 
Hello everyone
I am a newcomer to programming, I created a simple custom indicator (RSI) in a separate window, with arrows that appear in the graph window to signal me if RSI has crossed the level of overbought or oversold (the arrows have I created with the function ObjectCreate.
My problem is that when I remove the indicator from the chart, the arrows remain and do not know how to eliminate them.
Perhaps it is a trivial question, but I repeat that I am a beginner.
Thanks in advance deposit at all and sorry for the English but it is not my native language.
Nailgt.
avatar
12985
WHRoeder 2016.02.28 13:32 #
 
Nailgt: the arrows have I created with the function ObjectCreate.
  1. If you had used an arrow buffer they would have gone when you closed the indicator. SetIndexStyle - Custom Indicators - MQL4 Reference
  2. But you didn't, so you must delete them in OnDeinit. You'll need the subwindow ID (ChartWindowFind - Chart Operations - MQL4 Reference) and your object's prefix to pass to ObjectsDeleteAll - Object Functions - MQL4 Reference
Back to topics list  

To add comments, please log in or register