Loading…

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

SettingDefaultWhat it does
Fixed lots0.10Default lot size shown in the edit box on attach
Confirm above lots1.0Lot size at or above which a second confirmation is required
Confirm above risk percent2.0Money-at-risk (% of balance) at or above which confirmation is required (0 = ignore risk, gate on lo
Stop loss pips30Stop loss distance sent with the order, in pips - also used to compute risk %
Take profit pips60Take profit distance sent with the order, in pips (0 = none)
Confirm timeout secs20Seconds a pending confirmation stays valid before it auto-expires
Magic number20260824Magic number for orders opened by this panel
Slippage pips3Slippage tolerance, in pips
Max retries5Attempts per trade action before giving up
Retry wait ms500Pause between attempts, milliseconds
Button colorclrSteelBlueNormal button background colour
Confirm colorclrCrimsonConfirm button background colour, so it reads as distinct from the rest of the panel
Text colorclrWhiteButton text colour
Panel x10Panel X offset, pixels from corner
Panel y20Panel Y offset, pixels from corner

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Experts.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the expert advisor from the Navigator onto a chart, check the settings, allow Algo/Auto Trading and press OK.
  6. Test it first on a demo account or in the Strategy Tester.

Download the PDF guide

Tags: Buy/Sell Arrows · Risk & Lot Size · MT5 Expert Advisor · MQL5 Source Code

Expert advisors (EA) for MT4 & MT5 · PolyMaria