Creation a script for MT 5 - Instantly delete all objects
_________________________________________________________
Taken from the mql4 forum
Today we are going to create a simple script for Metatrader 5 that will instantly delete all objects on the active chart window. If you are experimenting with graphical objects or if you are using indicators that do not redraw graphical objects automatically, the script will save your time.
First, open MetaEditor 5 and press the "New" button. The MQL5 Wizard will start up. Select "Script" and press "Next":
All pictures are clickable!
Now give a name to your script and fill your copyright information - author and website, then press "Next":
A window with the code for your script will appear. Our script is probably the easiest one, because it contains only one line of code. Add this line of code as shown on the picture:
ObjectsDeleteAll(0);
//---
Now press the "Compile" button and make sure that no errors appear in the debugging window below:
The script is saved in your Scripts folder. Now open Metatrader 5 terminal and add some graphical objects to the chart.
Now open the navigator window, select your script and drag it to the chart window. All graphical objects will instantly disappear.
It's much faster than doing it by hand, isn't it?
________________________________________________________________________________________________________________________