Skip to content
All library documents

Moving Average Channel Breakouts with Pending Stop Orders

Article MQL5 code base

Summary

The document describes an Expert Advisor that builds a price channel from two moving averages: one calculated on high prices and one on low prices. It places Buy Stop and Sell Stop pending orders near the channel boundaries, aiming to enter when price breaks out and begins a strong move. Users can set take profit, trailing stop and step, channel offsets, moving average settings, and a unique identifier for the EA.

The EA can evaluate on every tick or only when a new bar appears, which changes how often it processes signals. Position size can be entered as a fixed lot amount or calculated from a risk percentage; the document says to use only one of those sizing inputs at a time. It provides no performance statistics or backtest results. It warns that the approach may have inactive periods with no entries, and describes the strategy only for currency pairs, so its effectiveness across markets and conditions is not established.

Key ideas

  • The channel is formed by separate moving averages of high and low prices.
  • Pending stop orders at the channel edges seek to capture breakouts.
  • The EA can check conditions on every tick or once per new bar.
  • Position sizing uses either a fixed lot value or a risk percentage.
  • The strategy may go through inactive periods without trade entries.

Tags

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