Skip to content
All library documents

Daily High and Low Breakout Orders with Risk Controls

Article MQL5 code base

Summary

This Expert Advisor describes a daily breakout strategy that places paired Buy Stop and Sell Stop orders around the day's high and low. At a configured terminal time, it offsets the order levels by a delta; when one order triggers, the other is removed. Setting the time to midnight instead uses the previous day's range. The strategy includes configurable stop-loss and take-profit distances, optional risk-based or fixed-lot sizing, breakeven handling, trailing stops, and a setting governing order placement when a trade is already open.

The document explains the mechanics and configuration but provides no backtest, performance figures, instrument selection, or rules for sizing the delta and exits. It therefore offers an implementable strategy outline rather than evidence that the approach is profitable. Results may depend on market, timeframe, broker execution, and parameter choices, none of which are evaluated here.

Key ideas

  • The system places buy-stop and sell-stop orders around daily price extremes, adjusted by a configurable point offset.
  • When one pending order activates, the opposite pending order is deleted.
  • A configurable time selects whether the EA uses the current day's range or the previous day's range.
  • Stop-loss, take-profit, position sizing, breakeven, and trailing behavior are adjustable settings.
  • The document describes the rules but provides no performance evidence or parameter validation.

Tags

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