Skip to content
All library documents

Doji Breakout Signals with Configurable Risk and Trade Management

Article MQL5 code base

Summary

This expert advisor uses a Doji candle as a setup and waits for the next completed candle to confirm a directional break. When a new bar appears, it checks the two preceding bars: if the older candle qualifies as a Doji, a close of the newer candle above the older candle’s high triggers a buy, while a close below its low triggers a sell. A configurable open-to-close body-size threshold controls which candles count as Doji patterns.

Trade controls include manual lot sizing or percentage-of-free-margin risk sizing, stop loss, take profit, trailing stop, trailing step, and a unique strategy identifier. The document says that changing the body-size parameter affects trade frequency and gives rough H1 trade-count guidance when the threshold is zero, but the referenced profitability breakdown is absent. It provides no complete performance evidence, market-by-market results, or validation of execution assumptions, so the rules should be treated as a pattern-based system description rather than evidence of an edge.

Key ideas

  • The setup identifies a Doji on the older of two completed bars and waits for the next bar to close beyond its range.
  • A close above the Doji high signals a buy, while a close below its low signals a sell.
  • The candle body-size threshold changes which setups qualify and can alter trading frequency.
  • Position sizing and protective exits are configurable, but the document does not provide complete profitability evidence.

Tags

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