Skip to content
All library documents

Placing Daily Breakout Stops at Recent Range Highs and Lows

Article MQL5 code base

Summary

This description outlines a pending-order breakout approach implemented by an Expert Advisor. It scans a configurable lookback range, set to 80 bars in the described version, and places a Buy Stop at the highest price and a Sell Stop at the lowest price. The aim is to enter when price moves beyond the observed range rather than choosing a direction in advance.

Orders remain active through the current day and are canceled when either side is triggered. The second version adds a parameter limiting the number of pending orders. The text explains order placement and expiry behavior but provides no market, timeframe beyond the daily expiration, entry buffer, stop-loss, profit-taking rule, or empirical results. It is therefore a mechanical order-placement description, not evidence that the breakout setup is profitable; fees, slippage, and false breakouts are not discussed.

Key ideas

  • The Expert Advisor places a Buy Stop at the lookback high and a Sell Stop at the lookback low.
  • The described range uses 80 bars, with the lookback intended to be configurable.
  • Pending orders expire at the end of the day.
  • When one pending order triggers, the remaining orders are removed.
  • A maximum pending-order setting was added, while profitability evidence is not supplied.

Tags

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