Pending Order Inspector MT5
- Индикаторы
-
Erdem Mumin Kaynak
I build and repair MetaTrader 5 Expert Advisors in MQL5. If your EA rejects orders, sizes positions incorrectly or behaves differently after a restart, I can work on that specific problem. - Версия: 1.0
Check a pending stop order before you send it.
A pending order can be refused for reasons the terminal can already show you: the price is not on the broker price grid, the volume is not a valid step, or the entry sits closer to the market than the symbol stops level allows. Pending Order Inspector MT5 reads those contract values and shows how your intended order compares with them, on the chart, before you place it yourself.
Enter the price, volume, optional Stop Loss and optional Take Profit you intend to use. The panel compares them with the current contract data and explains each result.
The indicator does not send, modify or delete orders. It does not calculate lot size, adjust your input or recommend a price. It cannot tell you whether a broker will accept an order; only the server decides that.
What the panel checks
- Entry direction relative to the current Ask or Bid
- Price tick grid. Point measures broker distance; tick size is the allowed price increment.
- Volume minimum, maximum and step
- Entry, Stop Loss and Take Profit geometry
- Stops-level distances
- Available trade mode and whether the symbol permits stop orders, Stop Loss and Take Profit
The contract card shows point, tick size, volume limits, stops level, freeze level, bid, ask and spread. Freeze level and spread are context, not a promise that a broker will accept or reject a new order.
An example
You intend to place a BUY_STOP at 1.23455 with 0.001 lots on a symbol whose tick size is 0.0001, whose minimum volume is 0.01 and whose volume step is 0.01.
The panel reports INVALID and shows which rules failed: the price is not on the tick grid, the volume is below the symbol minimum, and the volume is not a multiple of the volume step. For each of those rows it also shows the adjacent grid values. For volume, only neighbours inside the symbol volume limits are shown. Your input is never changed, and no value is presented as a recommended order size.
Read the result
CHECKS PASS means the completed static checks found no failed rule. It is not a broker acceptance guarantee.
INVALID means at least one rule failed. The panel shows the rule, the entered value and the relevant distance or grid.
CHECK means the indicator needs an entry or cannot obtain a value needed for a complete check. UNKNOWN labels an individual rule that cannot be completed. A complete pass is not possible while a required check is unavailable.
INFO identifies optional values that were not set.
Static pre-check only. Broker/server may still reject the request.
First use
- Attach the indicator to the symbol you want to inspect.
- Choose BUY_STOP or SELL_STOP in Inputs.
- Enter your intended entry price and volume. Add Stop Loss and Take Profit if required for your plan.
- Read the overall state and every non-pass row before you place an order manually.
Entry price 0.0 is intentionally not replaced with a market price. The panel reports CHECK: Set an entry price in Inputs instead.
Inputs
- InpOrderType - BUY_STOP or SELL_STOP
- InpEntryPrice, InpStopLoss, InpTakeProfit, InpVolume - the values you intend to send. They are inspected, never adjusted.
- InpRequireStopLoss, InpRequireTakeProfit - treat an unset optional level as required
- InpMaxQuoteAgeSeconds - maximum quote age for a complete check, default 60
- InpPanelX = 16, InpPanelY = 24 - offsets from the fixed upper-left panel corner
- InpShowLines - show non-draggable reference lines for entry, Stop Loss and Take Profit
Limits
This version checks one chart symbol and two pending stop types only. It does not support limit or stop-limit orders, draggable inputs, multi-symbol monitoring, alerts, CSV export, position management, risk sizing, OrderCheck or any trade request.
An entry of 0.0 shows CHECK: Set an entry price in Inputs. A stale or missing quote cannot produce CHECKS PASS. Quotes and server conditions can change after the panel refreshes. Test the indicator on a demo account and verify your broker's rules before sending an order.
Support
Support is provided through the product comments or MQL5 messages. I answer in English and Turkish.
