View Full Version : How to remove current indicator from chart ?

08-24-2015, 12:18 PM
How to remove the current (selected) indicator from the chart using Stop Script button without deleting other indicators?

Also let us know what code should we add in OnDeinit().

Thanks in advance.

08-24-2015, 12:35 PM
Dear NCD
you can use ObjectDelete (http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/2614) method instead of objectDeleteALL (http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/2615) method to delete Indicators without delete other Indicators

check this code

ObjectDelete 0, CStr(m_indID1)

and about the OnDeinit event , is generated when the script is stopped or new Script is attached to chart so you can put on it everything you want to deleted or make the values equal initialized values .