ChartIndicatorDelete does can delete any indicators?

 

I tested these sample codes for delete indicator on the chart:

mql4: https://docs.mql4.com/chart_operations/chartindicatordelete

mql5: https://www.mql5.com/en/docs/chart_operations/chartindicatordelete


The "ChartIndicatorDelete" function works for delete self indicator.

But can not delete another indicators from chart.


Return false for another indicators. and also "GetLastError()" returned:

mql4: Error code 0 , No error returned.

mql5: Error code 4115 , Error deleting an indicator from the chart.


Finally "ChartIndicatorDelete" does can delete any indicators?

 
NabiKAZ:

I tested these sample codes for delete indicator on the chart:

mql4: https://docs.mql4.com/chart_operations/chartindicatordelete

mql5: https://www.mql5.com/en/docs/chart_operations/chartindicatordelete


The "ChartIndicatorDelete" function works for delete self indicator.

But can not delete another indicators from chart.


Return false for another indicators. and also "GetLastError()" returned:

mql4: Error code 0 , No error returned.

mql5: Error code 4115 , Error deleting an indicator from the chart.


Finally "ChartIndicatorDelete" does can delete any indicators?

It can do it,  ut you have to search for the handle and delete the indicator with the handle, read the manuel

 
amando:

It can do it,  ut you have to search for the handle and delete the indicator with the handle, read the manuel

Thanks, I know about handle and IndicatorRelease for delete indicator.

But my question was about "ChartIndicatorDelete" and it was very clear, please read carefully.

 
NabiKAZ:

I tested these sample codes for delete indicator on the chart:

mql4: https://docs.mql4.com/chart_operations/chartindicatordelete

mql5: https://www.mql5.com/en/docs/chart_operations/chartindicatordelete


The "ChartIndicatorDelete" function works for delete self indicator.

But can not delete another indicators from chart.


Return false for another indicators. and also "GetLastError()" returned:

mql4: Error code 0 , No error returned.

mql5: Error code 4115 , Error deleting an indicator from the chart.


Finally "ChartIndicatorDelete" does can delete any indicators?

Yes it can. Fix your code, post it if you need help.
Reason: