Skip to content
All library documents

Pending-Order Grid EA: Placement, Spacing, and Order Maintenance

Article MQL5 code base

Summary

This description explains an expert advisor that maintains configurable grids of pending orders above and below the current market price. Traders choose the number of orders per side, spacing, lot size, slippage limit, and the order types used on each side. A take-profit level is attached to each pending order, while the advisor checks existing orders for the same symbol and its own identifier to avoid duplicates.

On each market tick, the advisor checks trading availability and timing, counts current pending orders, calculates grid levels, and adds orders subject to broker minimum-distance rules. It replaces orders when they are executed or canceled. The document offers a functional description and parameter examples, but no backtest or performance evidence. It also states that the EA does not manage open positions and has no stop loss or trailing stop, leaving substantial exposure management to the user. Its suitability for scalping or use across instruments is asserted without supporting results, and spacing must account for the broker's price precision.

Key ideas

  • The EA maintains buy and sell pending-order grids at configurable distances from market price.
  • Order direction and type can be selected separately for levels above and below the market.
  • The advisor monitors pending orders and replenishes the grid after execution or cancellation.
  • Take profits are attached to pending orders, but open positions receive no stop-loss or trailing management.
  • The description provides no empirical evidence that the approach is profitable.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.