Loading…

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

SettingDefaultWhat it does
Find textText to find (required)
Replace textReplacement text (blank deletes the match)
Case sensitivetrueCase-sensitive match
Prefix filterOnly touch objects whose name starts with this (blank = all)
Confirm firsttrueAsk for confirmation before applying

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Scripts.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the script onto a chart to run it once.

Download the PDF guide

Tags: Alerts · MT4 Script · MQL4 Source Code

MQL4 & MQL5 scripts · PolyMaria