Skip to content
All library documents

Using ATR to Set Adaptive Stops and Pending Orders in Expert Advisors

Article MQL5 articles

Summary

The article describes using Average True Range as a volatility measure in mechanical trading systems. It outlines two applications: filtering signals from other indicators according to market activity, and setting pending-order distances, stop-loss levels, take-profit levels, and trailing stops in proportion to current ATR. This lets price distances change with volatility instead of remaining fixed. The worked examples adapt Expert Advisors that use moving-average direction changes and other entry logic, updating protective levels in ATR units and moving trailing stops at bar changes.

The evidence is implementation-oriented: the article walks through Expert Advisor examples and code changes, rather than reporting a rigorous performance comparison. ATR does not indicate trend direction by itself, so the examples rely on separate signal logic. Adaptive distances may better reflect changing market conditions, but the document does not establish that they improve returns or control risk in all markets; the examples require testing and suitable parameter choices.

Key ideas

  • ATR measures market volatility or activity, but does not identify trend direction.
  • A system can use ATR conditions to filter signals generated by other indicators.
  • Pending-order distances and protective levels can be scaled to current ATR.
  • The examples update trailing stops at bar changes and combine ATR with separate entry logic.
  • The article provides implementation examples rather than robust evidence of improved trading results.

Tags

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