Weekend Gap Gaurd
- 유틸리티
- 버전: 1.0
Weekend Gap Guard protects your account from pending orders that are left on the server when the market closes for the weekend or for a holiday.
THE PROBLEM
Brokers often close gold and other CFDs early on holidays (for example the day after US Thanksgiving). Your EAs may not cancel their pending orders in time, and the orders stay on the server over the weekend. If the market opens with a gap, a buy stop or sell stop is filled at the opening price, far from its level, while its stop loss is still anchored to the original order price. Several stacked orders can fill together in one gap.
WHAT IT DOES
1. When you attach it, it takes a snapshot of every pending order that exists on the account at that moment.
2. While the market is closed it simply waits. It sends no requests to the server.
3. On the first tick after the market reopens it deletes those remembered pending orders.
4. If the gap has already filled one of them, the resulting position is closed immediately on the same tick.
5. When all remembered orders are gone, it removes itself from the chart.
New orders placed after you attach it (by you or by any other EA) are never touched. Orders are matched by ticket number, not by price, comment or magic number, so your EAs keep working normally after the open.
KEY FEATURES
- Works on any chart. One copy protects the pending orders of all symbols on the account.
- Works with any broker suffix (XAUUSD, XAUUSD+, XAUUSD.ecn, GOLD and so on). The symbol is read from each order.
- Each symbol is handled when its own market reopens, so a BTC chart can guard gold orders.
- Survives a terminal or VPS restart: the remembered list is kept in terminal global variables.
- Optional magic number filter, to guard the orders of one EA only.
- Opens no trades of its own on a live or demo account.
HOW TO USE
1. Before the market closes (or as soon as you notice pending orders left over the weekend), open any chart and attach Weekend Gap Guard.
2. Make sure Algo Trading is enabled. The Experts tab shows "watching X pending order(s)".
3. Keep the terminal or VPS running until the market opens. Nothing else to do.
INPUTS
- Delete remembered pending orders when market reopens (default true)
- Immediately close positions opened by remembered orders (default true)
- Magic number filter, -1 = all orders (default -1)
- true = all symbols, false = chart symbol only (default true)
- Max slippage when closing, in points (default 1000)
IMPORTANT NOTES
- The fill itself happens on the broker's server at the first price and cannot be prevented by any EA. The guard closes such a position right after the fill, so the cost is limited to the spread at the open.
- Designed for hedging accounts. On a netting account a pending order that merges into an existing position cannot be identified.
- The terminal (or VPS) must be running with Algo Trading enabled when the market reopens.
- In the Strategy Tester the utility runs a short demonstration: it places a small test buy stop and closes the fill, so you can see the logic at work.
