Text Label Batch Editor
A chart annotated with dozens of text notes or labelled markers has no built-in way to fix a shared typo, update a shared tag, or rename a recurring phrase without opening each object's properties dialog one at a time. This script scans every text-bearing object on the chart, finds the ones containing the search text, and replaces it in one pass, reporting exactly how many objects were matched and how many were actually changed. MQL4's built-in string replace is case-sensitive only. Rather than silently ignoring the case-insensitive option or failing to find matches with different capitalisation, this script includes a manual case-insensitive scan that matches against lower-cased copies of the text while splicing the replacement into the original string - so characters outside a match keep whatever case they already had. Notes and limitations Only OBJ_TEXT and OBJ_LABEL objects are touched - buttons, edit boxes and other text-bearing object types are left alone. Matching is a plain substring search, not a regular expression. Font size, font name and colour of each object are preserved exactly as they were; only the text content changes. Does not touch objects on other open charts.
Script · MT4 · v1.0 · Free
About Text Label Batch Editor
Text Label Batch Editor is a script for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 5 settings, such as Find text, Replace text and Case sensitive. MQL source code included.
Files in the download: TextLabelBatchEditor.mq4, TextLabelBatchEditor.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Find text | Text to find (required) | |
| Replace text | Replacement text (blank deletes the match) | |
| Case sensitive | true | Case-sensitive match |
| Prefix filter | Only touch objects whose name starts with this (blank = all) | |
| Confirm first | true | Ask for confirmation before applying |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Scripts.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the script onto a chart to run it once.
Tags: Alerts · MT4 Script · MQL4 Source Code