Skip to content
All library documents

A Range-Breakout Expert Advisor Using Pending Stop Orders

Article MQL5 code base

Summary

This description presents an Expert Advisor that places pending buy-stop and sell-stop orders at the highest and lowest prices found over a configurable lookback range. The example uses 80 bars and shows the approach on EUR/USD at a five-minute interval. Orders remain active through the trading day; once one is triggered, the other pending orders are removed.

The listed controls include order volume, stop loss, take profit, trailing stop and step, and operating hours. This defines a basic range-breakout entry mechanism, but the document offers no backtest, performance results, or detailed rules for re-entry and risk sizing. Its description is therefore insufficient to assess profitability or robustness across markets and timeframes.

Key ideas

  • The advisor places buy-stop and sell-stop orders at the extremes of a recent bar range.
  • Pending orders expire at the end of the day, and one triggered order cancels the other.
  • User inputs cover trade volume, protective exits, trailing behavior, and operating hours.
  • The description provides no performance evidence or broader validation.

Tags

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