Skip to content
All library documents

Moving Average Crossovers with ATR and Standard Deviation Filters

Article MQL5 code base

Summary

This document describes an Expert Advisor that checks for signals when a new bar appears. It identifies direction from a crossing of two moving averages, with a minimum separation threshold that can be set independently for buy and sell trades. After a direction is identified, the system applies Average True Range and standard deviation filters, also configured separately for buys and sells.

Trade controls include a fixed lot size, separate stop-loss and take-profit settings by direction, and a shared trailing stop and step. A maximum-position setting limits how many trades may be open at once. The description explains the EA’s inputs and general signal flow, but provides no parameter values, backtest, performance results, or detailed entry and exit rules. Its usefulness therefore lies in outlining a configurable indicator-based trend approach; the document alone does not establish whether the filters improve results or how the strategy behaves across markets.

Key ideas

  • The EA checks for trading conditions only when a new bar appears.
  • A crossover of two moving averages sets the initial trade direction.
  • A minimum moving-average separation and direction-specific ATR and standard deviation filters qualify signals.
  • Stops and targets can differ for buys and sells, while trailing settings are shared.
  • A maximum-position parameter caps concurrent trades.

Tags

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