Skip to content
All library documents

Trading Consecutive Candles with Fixed and Trailing Exits

Article MQL5 code base

Summary

This Expert Advisor looks for a chosen number of identical directional candles in sequence. It opens a buy position after a run of bullish candles and a sell position after a run of bearish candles. The version described exposes inputs for the required sequence length, trade lot, take-profit and stop-loss distances, trailing-stop distance and step, order identifier, and allowed slippage.

The document explains the entry concept and configurable trade-management settings, but it provides no rules for selecting markets or timeframes, no backtest, and no results. It does not establish whether a candle run tends to continue or reverse, or how trading costs and changing volatility affect outcomes. The sequence rule is a basic directional trigger whose behavior would need to be evaluated across instruments and market regimes; the listed exit controls make risk and order handling configurable but do not demonstrate that risk is controlled or returns are reliable.

Key ideas

  • The Expert Advisor counts a configurable run of identical directional candles.
  • It buys after consecutive bullish candles and sells after consecutive bearish candles.
  • Inputs include position size, take profit, stop loss, trailing-stop settings, slippage, and an order identifier.
  • The description gives no market, timeframe, backtest, or performance evidence.
  • The continuation signal and configurable exits require independent evaluation.

Tags

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