Two Step Order Confirmation
Type a lot size into the box, click Buy or Sell. If that size is under both configured thresholds, it opens immediately - this tool adds no friction to a normal trade. If the size is at or above the lot threshold, or the money it would risk at the configured stop distance is at or above the risk-percent threshold, nothing is sent yet. Instead a red CONFIRM button appears, printing the exact direction and lot size back at the trader, and the order only goes out if that specific button is clicked within the confirmation window. Anything else - a stray click, walking away, clicking Cancel - lets the window expire and the request is discarded. This exists for one specific failure: typing an extra digit into a lot box under pressure and sending ten times the intended size before noticing. A single click cannot catch that, because the mistake and the confirmation are the same action. Reading the size back on its own button, as a second and separate click, is what catches it. The two thresholds are independent and either one can trigger confirmation - a small-looking lot size on a low-tick-value symbol can still risk real money, and lots alone would miss that. Notes and limitations - The risk-percent gate needs InpStopLossPips greater than zero to convert lots into money at risk; with it at zero, only the lots threshold applies. - Only one pending confirmation is tracked at a time. Requesting a new order while one is already pending replaces it. - The confirmation window is enforced on a 1-second timer independent of ticks, so it expires reliably even on a quiet chart. - This tool only gates order entry. It does not manage, close or protect any position once opened.
Expert advisor · MT5 · v1.0 · Free
About Two Step Order Confirmation
Two Step Order Confirmation is an expert advisor (trading robot) for MetaTrader 5. It can size trades from your balance and risk percent. It has 15 settings, such as Fixed lots, Confirm above lots and Confirm above risk percent. MQL source code included.
Files in the download: TwoStepOrderConfirmation.ex5, TwoStepOrderConfirmation.mq5, TwoStepOrderConfirmation.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 |
|---|---|---|
| Fixed lots | 0.10 | Default lot size shown in the edit box on attach |
| Confirm above lots | 1.0 | Lot size at or above which a second confirmation is required |
| Confirm above risk percent | 2.0 | Money-at-risk (% of balance) at or above which confirmation is required (0 = ignore risk, gate on lo |
| Stop loss pips | 30 | Stop loss distance sent with the order, in pips - also used to compute risk % |
| Take profit pips | 60 | Take profit distance sent with the order, in pips (0 = none) |
| Confirm timeout secs | 20 | Seconds a pending confirmation stays valid before it auto-expires |
| Magic number | 20260824 | Magic number for orders opened by this panel |
| Slippage pips | 3 | Slippage tolerance, in pips |
| Max retries | 5 | Attempts per trade action before giving up |
| Retry wait ms | 500 | Pause between attempts, milliseconds |
| Button color | clrSteelBlue | Normal button background colour |
| Confirm color | clrCrimson | Confirm button background colour, so it reads as distinct from the rest of the panel |
| Text color | clrWhite | Button text colour |
| Panel x | 10 | Panel X offset, pixels from corner |
| Panel y | 20 | Panel Y offset, pixels from corner |
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: Buy/Sell Arrows · Risk & Lot Size · MT5 Expert Advisor · MQL5 Source Code