[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"indicator-atr-en":3},"# Average True Range (ATR)\n\n> StratCraft indicator page for ATR volatility measurement.\n\n**Route**: `\u002Findicators\u002Fatr\u002F`\n\n## What It Does\n\nATR measures market volatility by averaging the true range over a lookback period. It does not describe direction, only how much price is moving.\n\n## Formula\n\n`True Range = max(High - Low, |High - Prev Close|, |Low - Prev Close|)`\n\n`ATR = SmoothedMovingAverage(TrueRange, period)` (default `period = 14`). With a different `movav`, the selected moving average replaces the smoothed average.\n\n## Worked Example\n\n`period = 3`, illustrative true ranges `2, 3, 4` seed the smoothed average at `3`. For the next true range `5`: `ATR = (3 × 2 + 5) \u002F 3 = 3.67` (rounded).\n\n## Parameters\n\n- `period` - default `14`\n- `movav` - default `SmoothedMovingAverage`\n\n## Backtrader API\n\n```python\nimport backtrader as bt\natr = bt.indicators.ATR(data, period=14)\n```\n\n## Common Usage\n\n- Use ATR for stop-loss sizing.\n- Use ATR for volatility filters.\n- Combine ATR with breakout or regime logic.\n\n## Practical Pattern\n\nWhen ATR expands, the market is usually moving faster. When ATR contracts, compression may be building before a breakout.\n\nSource: https:\u002F\u002Fwww.backtrader.com\u002Fdocu\u002Findautoref\u002F\n"]