P
PipsGrowth

Key Takeaways

Difficulty:Beginner
Reliability:Very High
Category:volatility
Timeframes:1H, 4H, Daily

Average True Range (ATR)

volatilityšŸ“Š 1H, 4H, Daily

Measures market volatility by calculating the average range between high and low prices.

Formula

Code
True Range = Max[(High - Low), |High - Close(prev)|, |Low - Close(prev)|]
ATR = Moving Average of True Range

Detailed Explanation

Average True Range (ATR) was developed by J. Welles Wilder to measure volatility. Unlike indicators that show direction, ATR purely measures the degree of price movement.

**True Range considers:** - Current High minus Current Low - Current High minus Previous Close - Current Low minus Previous Close

**Applications:** - Position Sizing: Adjust size based on volatility - Stop Loss: Place stops at 1.5-3Ɨ ATR - Breakout Confirmation: High ATR confirms breakouts

Parameters

Period
Default: 14
ATR calculation period

šŸ“ˆ Bullish Signals

Rising ATR confirms trend strength during uptrend

šŸ“‰ Bearish Signals

Rising ATR confirms trend strength during downtrend

Python Implementation

ATR calculation with stop loss example

Python
import pandas_ta as ta
df['ATR'] = ta.atr(df['high'], df['low'], df['close'], length=14)
# ATR-based stop loss
entry_price = df['close'].iloc[-1]
atr_value = df['ATR'].iloc[-1]
stop_loss = entry_price - (2 * atr_value)

TradingView Pine Script

JavaScript
//@version=5
indicator("ATR")
atr = ta.atr(14)
plot(atr, "ATR", color=color.orange)
šŸ“Š Use TradingView for Advanced Charting
Professional analysis tools with 100+ technical indicators
Get TradingView Pro

MT5 MQL5 Code

C++
int atr_handle = iATR(_Symbol, _Period, 14);
double atr[];
CopyBuffer(atr_handle, 0, 0, 3, atr);

Common Mistakes

āœ—Using ATR to predict direction
āœ—Not adjusting ATR period for timeframe

Confirmation Signals

Trend direction indicators
Volume

Best For

Volatility measurementStop loss placementPosition sizing

šŸ’” Pro Tips

  • •ATR does not indicate direction, only volatility
  • •Use ATR multiples for stop losses (e.g., 2Ɨ ATR)
  • •Expanding ATR often precedes major price moves
Last updated: December 29, 2024

Educational Disclaimer

This content is for educational purposes only and does not constitute financial or investment advice. Trading involves significant risk and you may lose your capital. Always consult a licensed financial advisor before making investment decisions.

Frequently Asked Questions