SeekAlgo/Docs/TA Library Reference
Docs/sdk/TA Library Reference

TA Library Reference

Method-level reference for the `ta.*` indicator and signal library.

TA Library Reference

This page lists the current ta.* surface grouped by function family.

Moving Averages

Method Purpose
ta.sma(source, length) Simple moving average
ta.ema(source, length) Exponential moving average
ta.rma(source, length) Wilder moving average
ta.wma(source, length) Weighted moving average
ta.hma(source, length) Hull moving average
ta.dema(source, length) Double EMA
ta.tema(source, length) Triple EMA
ta.smma(source, length) Smoothed moving average
ta.alma(source, length, offset?, sigma?) Arnaud Legoux moving average
ta.vwma(source, length, volume?) Volume-weighted moving average

Oscillators

Method Purpose
ta.rsi(source, length) Relative Strength Index
ta.stoch(close, high, low, length) Stochastic oscillator
ta.stochRsi(source, rsiLength?, stochLength?, smoothK?, smoothD?) Stochastic RSI
ta.macd(source, fastLength?, slowLength?, signalLength?) MACD with signal and histogram
ta.cci(high, low, close, length) Commodity Channel Index
ta.mfi(high, low, close, volume, length) Money Flow Index
ta.williamsR(high, low, close, length) Williams %R
ta.roc(source, length) Rate of change
ta.momentum(source, length) Momentum difference
ta.awesomeOscillator(high, low) Awesome oscillator

Volatility

Method Purpose
ta.tr(high, low, close) True range
ta.atr(high, low, close, length) Average true range
ta.stdev(source, length) Standard deviation
ta.dev(source, length) Mean deviation
ta.variance(source, length) Variance
ta.bbands(source, length?, mult?) Bollinger Bands
ta.bbandsPercentB(source, length?, mult?) Bollinger %B
ta.bbandsWidth(source, length?, mult?) Bollinger Band Width
ta.keltner(high, low, close, length?, mult?, useTr?) Keltner Channels
ta.donchian(high, low, length) Donchian Channels
ta.historicalVolatility(source, length, annualize?) Historical volatility
ta.chaikinVolatility(high, low, length?, rocLength?) Chaikin volatility

Trend

Method Purpose
ta.adx(high, low, close, length?) ADX with plusDI and minusDI
ta.sar(high, low, start?, increment?, maximum?) Parabolic SAR
ta.aroon(high, low, length?) Aroon values and oscillator
ta.supertrend(high, low, close, length?, mult?) Supertrend value and direction
ta.ichimoku(high, low, close, conversionPeriods?, basePeriods?, spanBPeriods?, displacement?) Ichimoku components
ta.vortex(high, low, close, length?) Vortex indicator
ta.trix(source, length) TRIX

Signals And Value Helpers

Method Purpose
ta.crossover(seriesA, seriesB) Cross above
ta.crossunder(seriesA, seriesB) Cross below
ta.cross(seriesA, seriesB) Any cross
ta.highest(source, length) Highest value in lookback
ta.lowest(source, length) Lowest value in lookback
ta.highestbars(source, length) Offset of highest value
ta.lowestbars(source, length) Offset of lowest value
ta.sum(source, length) Sum across lookback
ta.change(source, length?) Change from earlier bar
ta.cum(source) Cumulative sum
ta.nz(value, replacement?) Replace NaN
ta.fixnan(value, prevValue?) Carry previous value through NaN
ta.hl2(high, low) Average of high and low
ta.hlc3(high, low, close) Average of high, low, and close
ta.ohlc4(open, high, low, close) Average of OHLC
ta.iff(condition, trueValue, falseValue) Conditional helper
ta.gt(a, b) Greater than
ta.lt(a, b) Less than
ta.ge(a, b) Greater than or equal
ta.le(a, b) Less than or equal
ta.eq(a, b) Equality check
ta.and(a, b) Logical AND
ta.or(a, b) Logical OR
ta.abs(value) Absolute value

Practical Guidance

  • use ta.* for indicator and signal logic
  • use math.* for plain numeric helpers
  • wrap derived values with series(...) before crossover checks
  • start from the closest built-in sample when a TA method is unfamiliar