Pending Order Guard News and Weekend mt4
- Utilità
- Versione: 1.0
- Attivazioni: 10
Pending Order Guard News and Weekend for MetaTrader 4 takes your pending orders off the broker before high-impact news, the nightly rollover and the weekend gap, and puts every one back afterwards with the same price, stop loss, take profit, lots, expiry, magic number and comment. One chart, no DLL, every setting in the panel.
Who it is for
- Prop-firm traders. Many prop firms do not allow a trade to open or close in a short window around high-impact news, and some count a pending order that fills in that window as a trade. The guard takes your pending orders off before the window and puts them back after it. Check your firm's rules and set the minutes before and after to cover its window.
- Traders who leave pending orders overnight, when spreads widen around the daily rollover.
- Traders who leave pending orders over the weekend, when Monday can open far from Friday's close.
- Traders who run EAs without their own news filter: listed EAs can be taken off their charts around news and come back with all their inputs.
What it does
- Parks pending orders before red news (optionally orange news), on the symbols the event's currency moves, or on all symbols.
- Parks pending orders over the nightly rollover, on the nights you choose.
- Parks pending orders over the weekend, from your Friday time to your Monday time.
- Puts each order back exactly: same symbol, type, lots, price, stop loss, take profit, expiry, magic number and comment.
- Guards every pending order of the account by default, manual or from any EA. You can narrow it to listed magic numbers or some symbols, or leave some out.
- Optionally pauses listed EAs and brings them back with their inputs.
- One panel shows the status, the next event, the parked orders and when they come back.
How it works
- Attach the EA to one chart. It guards every symbol of the account that you choose.
- Every second it checks news windows, the rollover window and the weekend window.
- When a window starts, each pending order in scope is written to the parked file first, then deleted at the broker. An order placed while a window is on is parked too.
- When every window is over, the orders are placed again: 30 seconds after news (you can change it), at the exact time you set after the rollover and the weekend.
- An order leaves the parked file only when the broker confirms it, and the guard checks for the same order at the broker before every send. A lost answer never creates a second order.
Windows that overlap or touch are joined: news during the rollover, or a Friday rollover inside the weekend, give one park and one restore.
Times on the clock you think in
Each park and restore time has its own clock: Sydney, Tokyo, Frankfurt, London, New York, Broker (server time) or My PC. Summer time is built in.
Example, the default weekend: park Friday at 2 pm New York, restore Monday at 10 am Tokyo. You type 14:00 with the clock on New York and 10:00 with the clock on Tokyo. The panel shows under each time what it means on your broker's clock, for example "= Fri 21:00 broker time" and "= Mon 03:00 broker time" for a broker on GMT+2 in December.
With "Wait for the broker's first prices" on, orders stay parked after the restore time until the chart symbol has a new price, for example on a holiday Monday.
Settings overview
All settings are in the panel, saved for each trading account. The EA has no inputs to set.
- News tab: park around news (on); red news (on), 10 minutes before and 10 after; orange news (off), 5 and 5; only these currencies; symbols parked (only symbols the news moves, or all symbols); when news is unknown (park all orders and warn, keep parked orders parked, or warn only).
- Orders tab: orders (all pending orders, or only listed magic numbers); only these symbols; never these symbols; never these magics; if price passed the entry (keep it parked and tell me, skip it and tell me, place at nearest distance, or open at market); wait after the window (30 seconds); tries before "failed" (10); pop-up alerts.
- EA pause tab: pause listed EAs around the window; their pending orders are deleted by default, so the EA places them again itself.
- Overnight / Weekend tab: park over the rollover (on), 16:45 to 17:20 New York, Monday to Thursday; park over the weekend (on), Friday 14:00 New York to Monday 10:00 Tokyo; wait for the broker's first prices (on). Each time with its own clock, and a warning for a window of 0 minutes, an overnight window over 12 hours or a weekend over 4 days. Example of a longer quiet-hours park: park at 20:00 on the London clock, restore at 10:00 on the Tokyo clock, nights Monday to Thursday. Orders stay off from the London evening to the Tokyo morning, about 5 hours (20:00 to 01:00 UTC in winter, 19:00 to 01:00 UTC in London summer time), and the rollover lies inside.
- Status tab: parked orders, and the buttons Park now, Restore now, Test settings and Discard failed.
Safety
- Never lost: each order is saved to the parked file before it is deleted.
- Never doubled: an order leaves the file only after the broker confirms it, and the guard looks for the same order at the broker before every send.
- Restart-safe: after a terminal restart, VPS reboot or chart change the guard reads the parked file and restores the orders when the window is over. If it stopped in the middle of a restore, the orders already put back are remembered, so the rest comes back once.
- Never fails open on news: without calendar data the status says "News unknown", never "Clear", and the guard does what you chose (by default it parks every order in scope and warns).
- A refused restore is retried and shown. After the set number of tries the order is marked failed and stays listed until you press Restore now or Discard failed. It is never dropped silently.
- No doubles from EAs: if an EA has already placed its order again (same magic number, symbol and type), the parked copy is not restored. The panel warns when one EA keeps placing orders in a window.
What it does not do
- It does not open, close or change positions; only pending orders.
- It does not move the stop loss or take profit of open trades.
- It gives no signals and does not trade for you.
- It cannot act while the terminal is closed: run it on a VPS or keep the terminal open.
- MetaTrader 4 has no built-in calendar, so the news part needs the calendar address allowed (see Setup).
Setup
- Attach Pending Order Guard to one chart, for example EURUSD H1. On the Common tab tick "Allow live trading"; the AutoTrading button must be green.
- Tools, Options, Expert Advisors: tick "Allow WebRequest for listed URL" and add the calendar address shown in the panel. The overnight and weekend parts need no address.
- Press Test settings on the Status tab. Every line should say OK.
Run one guard per account. A second copy sees the first and stays idle.
Try it in the Strategy Tester
The free demo runs in the Strategy Tester and shows the guard at work. The tester has no web access, so a showcase mode takes over there: it places four sample pending orders, uses a sample news schedule (red news on weekdays at 13:30 and 15:00 UTC), and parks and restores the samples through news, the rollover and the weekend, with a note on the chart. It also opens and closes one minimum-lot sample trade once. Nothing of this happens on a live chart. In the tester, the server clock counts as UTC.
Frequently asked questions
Do I need my broker's GMT offset?
No. Pick the clock you think in; the panel shows the broker time.
Which orders are parked?
Every pending order on the chosen symbols by default, yours or any EA's. "Only the magics below" narrows it.
What if the price passes my entry while the order is parked?
By default it stays parked and you get an alert. You can also skip it, place it as close as the broker allows, or open it at market.
What if the terminal restarts while orders are parked?
The parked file is read at start, and the orders come back when the window is over.
What if I remove the EA while orders are parked?
They stay parked and an alert tells you. Attach the guard again, or press Restore now.
Can I park only over the weekend?
Yes. Switch off news and the rollover.
Can I move to the MQL5 VPS while orders are parked?
Migrate when nothing is parked. The parked file stays with the terminal that wrote it.
Questions and support: through the comments on this page or private messages on MQL5.
