clearSGNLs_v1
Download scriptThis script is a specialized utility designed to automatically declutter your trading workspace by removing specific types of visual indicators from your charts.
Core Functionality
The primary purpose of this tool is to perform a "cleanup" of the screen. It scans every single object currently drawn on your active trading chart—such as lines, arrows, text boxes, or labels—and identifies which ones belong to a specific category.
How it Works
Instead of deleting everything on your screen (which might include important manual drawings or other tools you want to keep), the script follows a precise logic:
- Scanning: It looks at every individual object currently visible on the chart.
- Identification: For each object found, it inspects the very beginning of its name. It is specifically searching for any object whose name starts with the prefix "SGNL".
- Removal: If an object matches that specific "SGNL" identifier, the script automatically deletes it from the view.
Use Case
This tool is intended for traders who use automated systems or custom indicators that generate a large number of signals (like buy/sell arrows or markers). Once those signals have served their purpose and are cluttering the screen, running this script allows you to clear away all those specific signals instantly, leaving your chart clean while preserving any other non-signal related drawings.
//2009.01.30
//+---------------------------------------------------+
//| clearSGNLs.mq4 |
//+---------------------------------------------------+
#property copyright "Copyright © 2009, Kurl.FX"
//+---------------------------------------------------+
//| script |
//+---------------------------------------------------+
int start()
{
int obj_total=ObjectsTotal();
string name,chk;
for(int i=0;i<obj_total;i++)
{
name=ObjectName(obj_total-1-i);
chk=StringSubstr(name,0,4);
if (chk=="SGNL") ObjectDelete(name);
}
return(0);
}
//+---------------------------------------------------+
Comments