Volatility and Channels
6 algorithms in Technical Indicators · 6 with asserted arithmetic.
In this family#
-
True Range verified
The greater of today's range, the gap up from yesterday's close, and the gap down from it. Using the plain high−low range instead understates volatility on every gap.
trueRange(high, low, close) -
Average True Range (ATR) verified
Wilder-smoothed true range. Most often used for position sizing and stop placement rather than as a signal — it says how far price typically moves, not which way.
averageTrueRange(high, low, close, p) -
Bollinger Bands verified
A moving average with bands a number of standard deviations away, so the channel widens and narrows with realised volatility.
bollingerBands(close, p, multiplier) -
Keltner Channels verified
An EMA with bands placed a number of ATRs away. Because it scales with true range rather than standard deviation, it reacts differently to gaps than Bollinger Bands — which is the basis of the squeeze comparison between the two.
keltnerChannels(high, low, close, emaPeriod, atrPeriod, multiplier) -
Donchian Channels verified
The highest high and lowest low of the lookback. The oldest channel in use, and the only one here with no smoothing at all — the bands step rather than glide.
donchianChannels(high, low, p) -
Bollinger BandWidth verified
The width of a Bollinger channel relative to its middle band. Low readings mark contraction, which historically precedes expansion — the quantity behind every 'squeeze' screen.
bollingerBandwidth(close, p, multiplier)
What they share#
Every topic here is a series-transform, so once you have
called one the rest follow the same shape. Import paths differ only in the final segment:
import { trueRange } from "fintech-algorithms/technical-indicators/volatility-and-channels/true-range";
import { averageTrueRange } from "fintech-algorithms/technical-indicators/volatility-and-channels/atr";Read them in the order above — the sequence is pedagogical, not alphabetical.
Where this sits#
Technical Indicators collects 37 algorithms across 5 families. For the concept behind this family rather than the call signatures, see the concept guides.