Skip to content
All library documents

Previous-Candle Breakout Trading with Stops and Risk-Based Sizing

Article MQL5 code base

Summary

This document describes an automated strategy that enters when price breaks the high or low of a prior candle on a selected timeframe, from one minute through one month. The user can set an offset from that candle’s extreme and optionally apply moving-average filters. The system supports stop-loss and take-profit levels, and its trailing logic moves the stop to breakeven on the first stop adjustment.

Position size can be fixed or calculated from a per-trade risk percentage, with the settings requiring one method to be active at a time. The EA limits the number of positions per direction and can close all positions after a profit target is reached. The article explains inputs and behavior but provides no backtest, execution details, or evidence of profitability. Breakout systems can be vulnerable to false moves and timeframe-dependent behavior; the document does not specify how to evaluate those risks or define the optional filters.

Key ideas

  • The EA enters when price breaks a prior candle’s high or low on a configurable timeframe.
  • A price offset and optional moving-average filters can shape the entry condition.
  • Stop-loss, take-profit, and trailing settings are available, with the first trailing adjustment moving the stop to breakeven.
  • Position sizing uses either fixed lots or a risk percentage, but not both together.
  • The document describes controls but provides no evidence about profitability or false-breakout risk.

Tags

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