Skip to content
All library documents

A Manually Reset Pending-Order Grid Using Buy and Sell Stops

Article MQL5 code base

Summary

This expert advisor places buy-stop and sell-stop orders at configurable distances from the current price, forming a grid that can trade in the direction of price breakouts. Settings include starting lot size, optional lot increases, grid start distance, spacing between orders, order count, take profit, stop loss, and trailing stop. Unlike a fully automatic system, it requires periodic manual resetting.

The author contrasts this design with an earlier limit-order grid that entered against the trend and waited for pullbacks. This version uses stop orders and adds take-profit and grid-distance controls. The stated limitation is that order and position counts include activity across all symbols regardless of magic number, so concurrent use on multiple pairs is unreliable. The document gives feature descriptions and design caveats but no strategy rules for reset timing, risk analysis, or performance evidence.

Key ideas

  • The EA builds a grid of buy stops and sell stops around the current price.
  • Grid spacing, start distance, order count, exits, and lot scaling are configurable.
  • The stop-order design seeks entries in the direction of price movement, unlike the prior pullback-oriented limit design.
  • The EA needs periodic manual resets and cannot reliably manage several pairs concurrently because it counts all orders.

Tags

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