Reference
Trend
Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.
| Name / Signature | Description | Returns |
|---|---|---|
| alerta.ta.smasma(source, length) | Calculates the simple moving average over an N-bar period. | series float |
| alerta.ta.emaema(source, length) | Calculates the exponential moving average, assigning more weight to recent prices. | series float |
| alerta.ta.wmawma(source, length) | Calculates the weighted moving average. | series float |
| alerta.ta.vwmavwma(source, length) | Returns the volume-weighted moving average of source for length bars. | series float |
| alerta.ta.rmarma(source, length) | Wilder's smoothing average (Relative Moving Average), the smoothing RSI and ATR are defined with. It follows Pine's recurrence: the first value is the simple average of the first length values, then alpha * source + (1 - alpha) * previous with alpha = 1 / length. | series float |
| alerta.ta.adxradxr(high, low, close, length) | Calculates the ADXR by averaging current ADX with ADX from length bars ago. | series float |
| alerta.ta.adxadx(high, low, close, length) | Measures trend strength using the Average Directional Index. | series float |
| alerta.ta.dmidmi(diLength, adxSmoothing) or dmi(high, low, close, length) | Returns DI+ / DI- and ADX. Pine's form is ta.dmi(diLength, adxSmoothing), which smooths DI and ADX by DIFFERENT lengths and reads the chart's own high/low/close; the 4-argument form is kept for older scripts. | { plus, minus, adx } |
| alerta.ta.aroonaroon(high, low, length) | Returns Aroon Up and Aroon Down values. | { up, down } |
| alerta.ta.hmahma(source, length) | Calculates the Hull Moving Average. | series float |
| alerta.ta.almaalma(source, length, offset, sigma, floor) | Calculates the Arnaud Legoux Moving Average. | series float |
| alerta.ta.demadema(source, length) | Calculates the Double Exponential Moving Average. | series float |
| alerta.ta.tematema(source, length) | Calculates the Triple Exponential Moving Average. | series float |
| alerta.ta.trimatrima(source, length) | Calculates the Triangular Moving Average. | series float |
| alerta.ta.kamakama(source, length, fast, slow) | Calculates the Kaufman Adaptive Moving Average. | series float |
| alerta.ta.linreglinreg(source, length, offset) | Calculates the Linear Regression value over an N-bar window. | series float |
| alerta.ta.t3t3(source, length, vfactor) | Calculates the Tillson T3 moving average. | series float |
| alerta.ta.zlemazlema(source, length) | Calculates the Zero Lag Exponential Moving Average. | series float |
| alerta.ta.smmasmma(source, length) | Calculates the Smoothed Moving Average. | series float |
| alerta.ta.swmata.swma(source) | 4-period symmetric weighted moving average with weights [1, 2, 2, 1] / 6. | series float |
| alerta.ta.kcta.kc(source, length, mult, useTrueRange) | Returns Keltner Channel basis, upper and lower bands. | [basis, upper, lower] |
| alerta.ta.sarsar(start, inc, max) | Parabolic Stop and Reverse indicator. | series float |
| alerta.ta.supertrendsupertrend(factor, atrLength, high, low, close) | Returns SuperTrend line and trend direction (+1/-1). | { supertrend, direction } |