Skip to content
All library documents

ATR-Based Forex EA with MA and RSI Signals, Averaging, and Locking

Article MQL5 code base

Summary

This description outlines a MetaTrader expert advisor for EURUSD on a 15-minute chart. Entries use a moving-average trend filter and an RSI threshold: price must be on the appropriate side of the average, while RSI must be high for a sell signal or low for a buy signal. Stop loss and take profit are scaled to the current ATR value. Position size can be fixed or set from a per-trade risk parameter, and trailing first moves the stop toward breakeven before following price.

The EA may add positions when price moves against an existing trade by a configured distance. It also describes a locking condition tied to a previous losing trade in the same direction. The author specifies that the system requires a hedge account and prohibits netting accounts; trade-close detection uses transaction events. The document gives operational rules but no backtest or live-performance evidence, and it does not explain how key thresholds should be selected. Averaging and locking can increase exposure, so the described mechanics alone do not establish risk control.

Key ideas

  • Entries combine a moving-average direction filter with RSI thresholds.
  • ATR determines dynamic stop-loss and take-profit distances.
  • Trade size may be fixed or calculated from a stated risk parameter.
  • Trailing logic moves stops toward breakeven before applying a follow distance.
  • The EA can add same-direction positions after adverse price movement and requires a hedge account.

Tags

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