Skip to content
All library documents

Plan X: Close-Price Channel Breakout with Optional Signal Reversal

Article MQL5 code base

Summary

Plan X opens a position when the close of bar 1 differs from the close of a reference bar by more than a configured channel height. A move above the reference close triggers a buy by default, while a move below it triggers a sell. An optional reverse setting swaps those directions, changing the rule’s directional interpretation.

The expert advisor is specified for hedge accounts only. It can also restrict signal checks to a chosen time window; setting the end hour earlier than the start hour makes the interval cross midnight. The document mentions EURUSD on an hourly chart but supplies no backtest results, exit logic, position sizing, or evidence that the rule is profitable. The channel breakout rule is therefore only one component of a trading system, and its performance and risk controls remain unspecified.

Key ideas

  • The EA compares the latest completed bar’s close with the close at a configurable bar shift.
  • A close-price difference greater than the channel height triggers a position.
  • The reverse option swaps the default buy and sell directions.
  • Optional hour controls can limit when signals are checked, including across midnight.
  • The EA is intended for hedge accounts, and the document gives no performance evidence or exit rules.

Tags

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