What True Range measures
True Range is the largest of: current high minus current low; absolute value of current high minus previous close; absolute value of current low minus previous close.
ATR is the exponential moving average of True Range over the specified period. It is always positive and expressed in price units (pips for FX pairs).
Why EAs use ATR for stops
A fixed 30-pip stop may be too tight in high-volatility sessions and too wide when markets are quiet. ATR x 1.5 automatically widens during volatile periods (reducing premature stop-outs) and tightens in calm periods.
Common ATR period
Period 14 is the conventional default. Shorter periods (7-10) are more reactive; longer periods (20-30) are smoother and suit daily-close systems.