Skip to content
All library documents

Trading After a Run of Identical Candles with Exit Controls

Article MQL5 code base

Summary

The strategy looks for a specified number of consecutive candles with the same direction. When the run is bullish, it opens a buy trade; when the run is bearish, it opens a sell trade. The second version adds configurable trade management: take profit, stop loss, a trailing stop, and a trailing step. Other inputs include trade size, a magic number, and slippage, indicating that the description refers to an automated trading program with order and position settings.

The document states the signal rule and lists its inputs, but it does not explain how candles are counted, when an order is placed relative to candle completion, or how conflicting signals and open positions are handled. It includes no backtest, sample trades, market specification, or risk analysis. The rule is therefore a compact strategy concept, not evidence that directional candle runs predict subsequent returns. Any implementation would need explicit execution assumptions and testing across relevant instruments and costs.

Key ideas

  • The entry signal is a consecutive run of candles with the same direction.
  • A bullish run triggers a buy, while a bearish run triggers a sell.
  • The strategy version described includes take-profit and stop-loss settings.
  • A trailing stop can be enabled and paired with a trailing step.
  • No backtest results or detailed order-timing rules are provided.

Tags

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