Skip to content
All library documents

ATR-Based Pyramiding with Progressive Pending Orders

Article MQL5 code base

Summary

The document describes a set of trading scripts for adding to positions as price moves favorably. Traders can enter at market or use a stop order at the prior bar’s high or low, then place three additional pending orders in the same direction. A separate script removes pending orders.

Risk controls include an initial allocation of 2%, decreasing lot sizes for later entries, and ATR-based stop-losses and spacing. The stated defaults use ATR(30) multiplied by two for stops and ATR(30) divided by two between pending orders. The document provides no backtest results or performance evidence, and it does not explain how the allocation is calculated or how the scripts handle changing volatility. The order-deletion script affects all pending orders, so its scope is broader than a single trade setup.

Key ideas

  • The scripts add to positions as price moves in the intended direction.
  • Entries can begin at market or through a stop at the previous bar’s extreme.
  • Later pending orders use smaller lot sizes to limit increasing exposure.
  • Stops and order spacing are based on ATR, with specified default multipliers.
  • A separate script deletes all pending orders.

Tags

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