Ballast Spread Guard MT4
- 유틸리티
- 버전: 1.10
- 업데이트됨: 24 11월 2026
- 활성화: 5
Stop losing trades to the spread. At rollover and around news the spread can jump to ten or twenty times its usual size for a minute: pending orders fill at bad prices and stop-losses get hit although the price never went there. Ballast Spread Guard steps aside while the spread is wide and puts everything back when it is normal again.
Attach it to one chart. It watches the spread of that symbol (or a list of symbols) and acts on all their orders, manual or from any EA. It never opens a trade.
- Knows what "wide" is: the typical spread is the median of the last 24 hours, so the limit adapts to each symbol and broker. Wide = spread above 3x typical (or a fixed number of points). Normal again only after 60 seconds below the limit, so it does not flicker on and off.
- Lifts pending orders while the spread is wide and places them again afterwards with the same price, stop, target, volume, expiry, comment and magic number. An order whose price was passed meanwhile is not placed again (it would fill at once) and is reported. Orders that are only too close to the price wait until the broker accepts them.
- Shields stop-losses: a stop the wide spread could reach is moved further out (20x typical spread) as a safety stop at the broker, and the guard watches the real stop on the normal-spread price. If the market really reaches it, the trade is closed at market. When the spread is normal the stop goes back exactly where it was. If you change the stop yourself, the guard leaves it alone.
- Optional: close trades opened while the spread is wide; alert and push notification when the spread turns wide; only one magic number.
- Spread log for every weekday hour (average, maximum, minutes wide) in MQL4\Files\SpreadGuard_<symbol>.csv. The panel shows the most expensive hours of your broker, so you know when not to trade.
- For other EAs: the global variable SpreadGuard_<symbol> is 1 while the spread is wide.
Tested
- The MT4 tester keeps the spread fixed, so three runs (EURUSD one year on M15 and H1, Gold five months) replayed a spread with a nightly rollover spike and random spikes of 4 to 12 times normal, with a random trader and an independent tracker.
- Result: 14,201 wide spells, 0 ticks where the guard and the tracker disagreed; 0 trader orders left in a wide spell; 0 stops within reach of the spread left unshielded. 118,773 orders lifted, 118,563 placed again identical, 0 different, 210 not placed again because the price had passed them. 36,114 stops shielded. This checks how the guard works, not how much money it saves: the replayed spread is not a real market.
Notes
- MT4 has no market-wide spread history per minute, so the guard builds the typical spread itself (a few minutes after the start, then from its own log).
- A restored pending order gets a new ticket number. If an EA tracks its own pending orders by ticket, keep it out with "Only this magic number" or turn off "Lift pending orders".
- While a stop is shielded, the guard must be running (keep the terminal on, e.g. on a VPS). If it is not, the safety stop at the broker still protects the trade, further out.
- When the market really reaches a shielded stop during a spike, the trade is closed at market and pays part of the wide spread. Weekend gaps are not affected by any stop.
- The MT4 tester has a fixed spread, so in the Strategy Tester the demo simulates a spread spike on weekdays from 20:00 to 20:20 and opens a trade and a pending order at 19:57, so you can watch the guard work. This never happens on a real chart.
Inputs
- Wide when spread > this x typical spread — 3 (0 = off)
- Wide when spread > this many points — 0 = off
- Normal again after this many seconds below the limit — 60
- Symbols — e.g. EURUSD,GOLD; empty = this chart only
- Lift pending orders, restore them afterwards — true
- Shield stop-losses — true
- Shielded broker stop: this x typical spread further out — 20
- Close trades opened while the spread is wide — false
- Only this magic number — -1 = all, 0 = manual trades
- Alert / push notification when the spread turns wide — false
- Panel font size, corner — 9, upper left
Works well with
- Ballast Exit Manager MT4 — break-even, partial close and trailing stop in R
- Ballast Stealth Stops MT4 — hidden stop-loss and take-profit with a wider emergency stop
- Ballast OCO Orders MT4 — one-cancels-other pending orders and a one-click straddle
