Skip to content
All library documents

Periodic Range Breakout Trading with Range-Based Stops and Targets

Article MQL5 code base

Summary

This mechanical strategy sets a reference price at the start of a chosen period, then places upper and lower breakout levels at a user-defined distance from that price. An upward break can trigger a buy-stop or sell-limit order, while a downward break can trigger a buy-limit or sell-stop order, depending on the selected trade mode. Stop-loss and take-profit distances are defined as percentages of the derived range.

The system can optionally attempt to recover a losing trade by increasing position size or changing the take-profit level on the next trade. Its notes warn that win and loss counts depend on the relationship between target and stop distances. A smaller target relative to the stop may raise short-term win frequency, but consecutive losses can still cause severe equity declines. The document provides no backtest results, market-specific validation, or detailed rules for period and range selection; its risk observations are qualitative, and recovery settings may increase exposure.

Key ideas

  • The strategy anchors breakout levels to the price observed at the beginning of each period.
  • Trade direction and order type depend on which boundary is crossed and the selected mode.
  • Stop-loss and take-profit distances are calculated as proportions of the range.
  • A smaller target relative to the stop may increase short-term win frequency while leaving exposure to rare losing streaks.
  • Increasing size or adjusting targets after losses can be used as a recovery setting, but may raise risk.

Tags

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