Requote Retry Manager
Most published EAs treat OrderSend failure as binary: it worked, or the whole entry attempt is abandoned. In live trading that throws away trades on transient noise - a requote, a momentarily busy trade context, a slow tick during news - that would have gone through on a second attempt taken a few hundred milliseconds later with a fresh price. This tool isolates that retry logic into one self-contained button press so its behaviour can be inspected directly rather than trusted blindly. It first classifies the broker error: retryable codes such as requote, off quotes, price changed, server busy and trade context busy get another attempt; permanent codes such as invalid stops or insufficient margin stop the sequence immediately, because retrying those only wastes time and log noise. A busy trade context is treated as a queue, not a failure, and is waited out before the attempt counter is even touched. Every retry refreshes rates and rebuilds the order at the current price rather than resending a stale one, and the wait between attempts doubles each time (the backoff multiplier and cap are both inputs), so a genuinely struggling server is not hammered with instant resends. Trading is disabled by default. The on-chart panel reports exactly what happened on the last sequence - attempt count, retry count and the final outcome - so the retry behaviour is visible, not just assumed. Notes and limitations - This is a retry-logic demonstration, not a trading strategy. It opens at most one order per button press, only on request. - The backoff schedule is deliberately simple (multiply and cap) rather than jittered; that keeps the demonstration readable, but a production system trading at scale would usually add random jitter to avoid many clients retrying in lockstep after a shared outage. - Permanent errors stop the sequence immediately by design - retrying an invalid-stops or no-money error only produces log noise, never a fill.
Expert advisor · MT5 · v1.0 · Free
About Requote Retry Manager
Requote Retry Manager is an expert advisor (trading robot) for MetaTrader 5. It increases the lot size after a losing trade (martingale). It has 10 settings, such as Enable trading, Max retries and Base wait ms. MQL source code included.
Files in the download: RequoteRetryManager.ex5, RequoteRetryManager.mq5, RequoteRetryManager.txt.
Trading robots can lose money. Check every setting and test on a demo account before using real funds.
Settings
| Setting | Default | What it does |
|---|---|---|
| Enable trading | false | Off by default - arm before pressing the demo button |
| Max retries | 5 | Maximum send attempts before giving up |
| Base wait ms | 300 | Base wait between attempts, milliseconds |
| Backoff multiplier | 2 | Wait multiplies by this after each retryable failure |
| Max wait ms | 5000 | Cap on the backoff wait, milliseconds |
| Lots | 0.01 | Lot size for the demo order |
| Slippage pips | 3 | Slippage tolerance, in pips |
| Stop loss pips | 20 | Stop loss distance, in pips (0 = none) |
| Take profit pips | 0 | Take profit distance, in pips (0 = none) |
| Magic | 20261301 | Magic number this EA tags its own orders with |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Experts.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the expert advisor from the Navigator onto a chart, check the settings, allow Algo/Auto Trading and press OK.
- Test it first on a demo account or in the Strategy Tester.
Tags: News Trading · Binary Options · Martingale · MT5 Expert Advisor · MQL5 Source Code