How to clear chart (from objects) after switching to different TIMEFRAME chart?
//+------------------------------------------------------------------+ //| Deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { DelObjects(); } void DelObjects() { ObjectsDeleteAll(0,Label_prefix,-1,-1); //Label_prefix - the prefix of your objects ChartRedraw(0); }
Taras Slobodyanik:
thanks!!!!!
I code indicator which plotes trendlines...
However, after switching to different timeframe chart, the previously ploted objects are still there, on new Timeframe chart...
How to delete those previous Timeframe's chart's objects automatically?