Skip to content
All library documents

Managing a Range-Based Grid EA with Pending Limit Orders

Article MQL5 code base

Summary

The document outlines an automated grid approach that places equally spaced pending limit orders around the current market price. It places sell limits above price and buy limits below, with the trading range derived from weekly highs and lows. Once orders execute, the EA manages the remaining orders according to the number of filled positions: it adds a new limit at the previous price after two executions, and resets orders to the range when executions approach the configured total.

The update notes add a magic number, chart-symbol control, trading-hour restrictions, and an option to close all trades after a specified end time. The description supplies only a high-level order-management outline and points to a video for the full strategy. It does not specify grid spacing, position sizing, exposure limits, execution assumptions, or performance evidence, so the risks of persistent trends and accumulated inventory cannot be assessed from this text alone.

Key ideas

  • The EA places equally spaced pending limit orders above and below the current price.
  • Weekly highs and lows define the range used to position the grid.
  • Order management responds to execution counts by adding or resetting pending limits.
  • The described update adds symbol, time, and forced-close controls.
  • Grid spacing, sizing, risk limits, and performance results are not provided.

Tags

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