Author: Copyright � 2009, Kurl.FX
clearSGNLs

This script is a specialized utility designed to automatically organize your trading charts by removing specific types of visual markers. Its primary purpose is to declutter the workspace by identifying and deleting any graphical objects that are labeled with a specific prefix.

How it works:

The tool scans every single object currently displayed on your active trading chart—this includes various elements like trend lines, arrows, labels, or custom indicators. As it examines each item, it looks at the first four characters of the object's name.

If the script identifies that an object begins with the specific identifier "SGNL," it immediately removes that object from the screen. If the object does not start with those exact letters, the script leaves it untouched.

Key Benefits for the User:

  • Chart Cleanup: It provides a quick way to clear out old signals or automated markers without having to delete each one manually.
  • Selective Removal: Because it looks for a specific prefix, it is designed to be precise. It only targets "SGNL" related items, ensuring that your other important drawings, notes, or custom indicators remain on the chart.
  • Efficiency: Instead of clicking through dozens of individual markers to delete them one by one, this script performs the entire cleanup process in a single execution.
12 Views
0 Downloads
0 Favorites
clearSGNLs
//2009.01.30
//+------------------------------------------------------------------+
//|                                                   clearSGNLs.mq4 |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2009, Kurl.FX"
#property link      ""
//+------------------------------------------------------------------+
//| script ""     |
//+------------------------------------------------------------------+
int start()
  {
     int    obj_total=ObjectsTotal();
     string name;
     for(int i=0; i<obj_total; i++)
     {
          name=ObjectName(obj_total-1-i);
          string chk=StringSubstr(name,0,4);
          if (chk=="SGNL") ObjectDelete(name);
     } 
      return(0);
  }
//+------------------------------------------------------------------+

Comments