ATR: Average True Range
Wilder-smoothed measure of daily price expansion that explicitly incorporates overnight gaps.
close - (2.0 * @ATR(high, low, close, 14)) Key Takeaways
- The foundational metric for dynamic stop-loss placement and risk-parity position sizing.
- Accurately accounts for morning opening gap risk common in Indian equity markets.
- Purely measures volatility magnitude without imparting directional bias.
What It Means in Simple Terms
ATR measures the true daily trading range of a stock in rupees. Unlike a simple High minus Low calculation, ATR accounts for overnight gaps! If a stock closes at ₹100 yesterday and opens at ₹105 today, that ₹5 gap is real risk that ordinary range calculations ignore. ATR captures every rupee of true movement.
How It Helps You as an Investor
ATR is the single most valuable tool for setting intelligent stop losses. If a stock normally swings ₹10 a day, putting a ₹4 stop loss guarantees you will get stopped out by random noise. ATR tells you how much room to give the stock so you only exit when the trend is genuinely broken.
Visual Node Rule Syntax & How to Plug in Values
close - (2.0 * @ATR(high, low, close, 14)) Parameter Tuning & Market Calibration
The standard lookback is 14 days. To set a trailing stop loss, multiply ATR by 2.0 or 2.5: `Stop = Highest Close - (2.5 * ATR)`. To size positions, divide your target rupee risk (e.g. ₹10,000) by (2 * ATR). This ensures that every position in your portfolio risks the exact same amount.
Input Fields & Parameters
| Field / Parameter | Type | Default | Role & Description |
|---|---|---|---|
high | field | Required | Historical input price or volume series from market feed. |
low | field | Required | Historical input price or volume series from market feed. |
close | field | Required | Historical input price or volume series from market feed. |
timeperiod | int | 14 | Lookback period or tuning parameter for market calibration. |
Mathematical Formulation
The mathematical definition of ATR (Average True Range) as evaluated within the Saral Engine execution pipeline:
Variable & Parameter Definitions
True Range ($TR$) takes the maximum of the current high-low span or the gap from prior close. $ATR$ smooths $TR$ over $n$ periods using Wilder's smoothing.
Systematic Strategy Applications
close < highest(close, 20) - (2.5 * @ATR(high, low, close, 14)) Trail stop loss 2.5 ATRs below the 20-day high to lock in gains without getting shaken out by normal noise.
Common Questions & Practical Considerations
Does ATR tell me whether to buy or sell?
No. ATR is completely non-directional. ATR expands during both violent panic crashes and explosive parabolic rallies. It only tells you how much the asset is moving, not which way.
What is Normalized ATR (NATR)?
ATR is denominated in rupees. NATR expresses ATR as a percentage of the closing price ($100 \times ATR / Close$), allowing you to compare volatility across stocks of different prices.