Download MetaTrader 5

How to remove the objects created to the indicator closed

To add comments, please log in or register
They are making profit already using Freelance service. You can join them!
nailgt
5
nailgt 2016.02.28 08: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.
whroeder1
14528
whroeder1 2016.02.28 12: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
To add comments, please log in or register