Reference
Volatility
Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.
| Name / Signature | Description | Returns |
|---|---|---|
| alerta.ta.trta.tr(handle_na = false) or tr(high, low, close) | Calculates the True Range for each bar. Pine v6 form is `ta.tr(handle_na)` operating on chart H/L/C; a legacy 3-arg form accepting custom series is also supported. | series float |
| alerta.ta.atrpatrp(high, low, close, length) | Calculates ATR as a percentage of price. | series float |
| alerta.ta.cvicvi(high, low, emaLength, rocLength) | Measures volatility as percent change of EMA(high-low) over a lookback. | series float |
| alerta.ta.natrnatr(high, low, close, length) | Calculates ATR normalized by price (percent). | series float |
| alerta.ta.atratr(length) | Calculates the Average True Range, a measure of market volatility. | series float |
| alerta.ta.bbbbands(source, length, mult) | Bollinger Bands: a simple moving average of source (the middle band) and the bands mult standard deviations above and below it. Returns the tuple [middle, upper, lower], as Pine's ta.bb does; ta.bbands and bbands are the same function. | [middle, upper, lower] |
| alerta.ta.stdevstdev(source, length, biased = true) | Calculates standard deviation of source over length bars. Pine v6 third argument `biased` selects the biased (Bessel-corrected off) or unbiased estimator; defaults to true. | series float |
| alerta.ta.dcta.dc(length) | Calculates the Donchian Channel — the highest high and lowest low over a given period. Returns an object with upper, lower, and basis (midline) series. | { upper: series float, lower: series float, basis: series float } |