Download MetaTrader 5
To add comments, please log in or register
Sign up to publish an article and receive 200 USD
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
13627
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