Skip to content
All library documents

Forex Trend-Line EA with Moving-Average Filters and Risk Controls

Article MQL5 code base

Summary

The document describes an automated trading system that combines a drawn trend line with two moving averages. It trades in the direction of the trend, using the trend line as a filter alongside the averages. The system is intended for forex pairs and stocks, and includes options for take profit, trailing stops, breakeven moves, equity-based drawdown control, and limits on simultaneous trades. Position size can increase after losses, a setting the document says can be disabled.

The description gives configuration ranges but no performance results or evidence that the method is profitable. It also notes a key testing limitation: backtests optimize the moving averages, while the trend line is only displayed and does not affect simulated trades; the combined filter operates in live trading. The strategy’s behavior therefore cannot be fully assessed from the stated test setup. Its many configurable exits and position-sizing options also leave risk dependent on parameter choices and deployment conditions.

Key ideas

  • The EA combines a trend line with fast and slow moving averages to filter trade direction.
  • The trend-line filter is active in live trading but is not included in trade decisions during tests.
  • The system offers monetary or percentage profit targets, trailing stops, breakeven settings, and an equity drawdown control.
  • Position size may increase after losses, although the increase can be disabled.
  • The document provides settings and intended behavior but no evidence of trading performance.

Tags

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