Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

Scripts

DeleteAllObject - script for MetaTrader 4

Mohamad Zulhairi Baba | English Español Português 日本語 Deutsch

Views:
2038
Rating:
votes: 6
Published:
2020.06.11 22:26

The script is best use to clean up all drawings (horizontal line, vertical line, arrows etc) on current chart.

Please feel free to modify based on your needs.

void OnStart()
  {
   Comment("");
   ObjectsDeleteAll(0,"",0,OBJ_VLINE);
   ObjectsDeleteAll(0,"",0,OBJ_HLINE);
   ObjectsDeleteAll(0,"",0,OBJ_TREND);
   ObjectsDeleteAll(0,"",0,OBJ_TRENDBYANGLE);
   ObjectsDeleteAll(0,"",0,OBJ_CYCLES);
   ObjectsDeleteAll(0,"",0,OBJ_CHANNEL);
   ObjectsDeleteAll(0,"",0,OBJ_STDDEVCHANNEL);
   ObjectsDeleteAll(0,"",0,OBJ_REGRESSION);
   ObjectsDeleteAll(0,"",0,OBJ_PITCHFORK);
   ObjectsDeleteAll(0,"",0,OBJ_GANNLINE);
   ObjectsDeleteAll(0,"",0,OBJ_GANNFAN);
   ObjectsDeleteAll(0,"",0,OBJ_GANNGRID);
   ObjectsDeleteAll(0,"",0,OBJ_FIBO);
   ObjectsDeleteAll(0,"",0,OBJ_FIBOTIMES);
   ObjectsDeleteAll(0,"",0,OBJ_FIBOFAN);
   ObjectsDeleteAll(0,"",0,OBJ_FIBOARC);
   ObjectsDeleteAll(0,"",0,OBJ_FIBOCHANNEL);
   ObjectsDeleteAll(0,"",0,OBJ_EXPANSION);
   ObjectsDeleteAll(0,"",0,OBJ_RECTANGLE);
   ObjectsDeleteAll(0,"",0,OBJ_TRIANGLE);
   ObjectsDeleteAll(0,"",0,OBJ_ELLIPSE);
   ObjectsDeleteAll(0,"",0,OBJ_ARROW_THUMB_UP);
   ObjectsDeleteAll(0,"",0,OBJ_ARROW_THUMB_DOWN);
   ObjectsDeleteAll(0,"",0,OBJ_ARROW_UP);
   ObjectsDeleteAll(0,"",0,OBJ_ARROW_DOWN);
   ObjectsDeleteAll(0,"",0,OBJ_ARROW_STOP);
   ObjectsDeleteAll(0,"",0,OBJ_ARROW_CHECK);
   ObjectsDeleteAll(0,"",0,OBJ_ARROW_LEFT_PRICE);
   ObjectsDeleteAll(0,"",0,OBJ_ARROW_RIGHT_PRICE);
   ObjectsDeleteAll(0,"",0,OBJ_ARROW_BUY);
   ObjectsDeleteAll(0,"",0,OBJ_ARROW_SELL);
   ObjectsDeleteAll(0,"",0,OBJ_ARROW);
   ObjectsDeleteAll(0,"",0,OBJ_TEXT);
   ObjectsDeleteAll(0,"",0,OBJ_LABEL);
   ObjectsDeleteAll(0,"",0,OBJ_BUTTON);
   ObjectsDeleteAll(0,"",0,OBJ_CHART);
   ObjectsDeleteAll(0,"",0,OBJ_BITMAP);
   ObjectsDeleteAll(0,"",0,OBJ_BITMAP_LABEL);
   ObjectsDeleteAll(0,"",0,OBJ_EDIT);
   ObjectsDeleteAll(0,"",0,OBJ_EVENT);
   ObjectsDeleteAll(0,"",0,OBJ_RECTANGLE_LABEL);
  }
Recommendations:
  • Create keyboard hotkey for the script - right click on script name and then select "Set hotkey".
  • Or drag and drop script on the chart.

Warning:

  • No user input required.
  • This script will delete all object in the current chart. 
  • Make sure to test the script with simple "new" chart, before applying to your working chart.
























Independent Chart Independent Chart

Independent Chart Indicator for MT4

All In One Mirror All In One Mirror

Mirror indicator with a dropdown list of base indicators to choose from with optional alerts, email, and push notifications.

Bar Time Count Down Bar Time Count Down

This MT4 indicator is to count down the remaining time as the format HH:MM:SS

PivotPointsLines _v1.1 PivotPointsLines _v1.1

Draws Pivot Points Level Lines for formula's Floor,Fibonacci,Camarilla,Woodie