Skip to content
All library documents

Linear Regression Channel Filter with Moving-Average Trading Rules

Article MQL5 code base

Summary

This Expert Advisor description combines a linear regression channel with two moving averages to trade in the direction of a trend. The channel is intended to act as a filter alongside the moving-average logic, while the advisor also offers configurable take-profit, stop-loss, trailing-stop, and equity-risk controls. It says orders use the price of the open candle and lists adjustable channel length, moving-average periods, trade limits, and lot sizing parameters.

The stated testing limitation is material: the regression channel is not included in backtest trade creation, and optimization tests can evaluate only the moving averages. In visual test mode the channel is drawn but does not influence trades; the combined filter is described as working in live trading. As a result, the document provides no reliable evidence for the channel's effect on historical performance. It also includes an option to increase lot size after losses, which can amplify drawdowns, and advises trying the system on a demo account first. The listed settings are configuration ranges, not validated recommendations.

Key ideas

  • The advisor combines a linear regression channel filter with fast and slow moving averages to follow trends.
  • It offers configurable profit targets, stop losses, trailing exits, equity stops, and trade limits.
  • The channel is excluded from backtest trade decisions, so optimization results do not test the full live logic.
  • Increasing position size after losses is available and may raise drawdown risk.
  • The document provides configuration options but no performance results or validated settings.

Tags

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