Skip to content
All library documents

Consolidation Channels and Spacing Rules for a Two-Sided Expert Advisor

Article MQL5 code base

Summary

The Expert Advisor identifies price consolidation levels and draws them as horizontal lines that form a channel. It uses the upper pair of lines as a corridor for buy positions and the lower pair for sells. The rules limit the number of positions of each type and impose a waiting interval before another position of the same type can be opened. That interval scales with the selected history timeframe.

Inputs include a minimum distance from a consolidation line before entry, trade risk as a percentage of free margin, a stop-loss distance, a minimum profit threshold for closing all positions, and a unique identifier. The document mentions a test on EURUSD at the H1 timeframe with default settings, but supplies no performance figures or test details. It therefore explains the EA’s structure and controls without providing evidence that the approach is profitable or robust across markets or settings.

Key ideas

  • The EA marks consolidation levels as horizontal channel lines.
  • The upper corridor is used for buy positions and the lower corridor for sells.
  • It limits the number of open positions per direction and spaces additional entries by a timeframe-based interval.
  • Risk, stop loss, minimum profit, and entry distance are configurable inputs.
  • The stated EURUSD H1 test has no reported performance results.

Tags

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