Loading…

Symbol Specification Change Watcher

Brokers change symbol specifications without notice more often than most traders realise - a contract size adjustment, a widened stop level, a margin requirement update, a swap rate revision. None of it produces an error message. Code that was correctly reading MarketInfo() values keeps compiling and keeps running, it just starts sizing positions or placing stops against numbers that no longer match reality. This EA reads eight specification fields - lot size, stop level, freeze level, initial margin, a maintenance-margin figure, long swap, short swap and tick value - for every symbol in Market Watch, on a timer, and compares each against a stored snapshot. Any change triggers an Alert naming the symbol, the field and both the old and new value. The snapshot is written to a CSV file in the terminal's sandbox and reloaded on every restart. Without that persistence, restarting the terminal would silently re-baseline on whatever the broker had already changed to, and the change would never be caught - so the file is deliberately part of the design, not an afterthought. Notes and limitations - Only symbols currently visible in Market Watch are tracked; a symbol removed from Market Watch drops out of future checks until it reappears. - A symbol seen for the first time is recorded as a new baseline rather than treated as a change, so nothing is falsely flagged on first run. - Read-only. It never sends, modifies or closes an order - only Alert, Print and Comment are used to surface what it finds.

Expert advisor · MT4 · v1.0 · Free

About Symbol Specification Change Watcher

Symbol Specification Change Watcher is a script for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 2 settings, such as Check interval secs and Snapshot file. MQL source code included.

Files in the download: SymbolSpecificationChangeWatcher.ex4, SymbolSpecificationChangeWatcher.mq4, SymbolSpecificationChangeWatcher.txt.

Settings

SettingDefaultWhat it does
Check interval secs300How often to recheck every Market Watch symbol
Snapshot fileSymbolSpecificationChangeWatcher.csvFile in MQL4\Files used to persist the last known specification

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 Expert Advisor · MQL4 Source Code

Expert advisors (EA) for MT4 & MT5 · PolyMaria