Talib
Exposes the TA-Lib indicator library to JavaScript and Python strategies (not available in Rust).
In JavaScript, pass a K-line array (the fields each function needs are taken automatically) or numeric arrays. Functions with several outputs return a two-dimensional array, and the leading part with too few bars to compute is NaN.
In Python, talib is the TA-Lib Python package installed on the docker's machine (pip install TA-Lib, which depends on numpy); without it, any call raises Please install talib module for python. Pass numpy arrays such as records.Close as each function requires. Functions with several outputs return a tuple of numpy arrays. Functions that need several price fields (parameters named inPriceHLC, inPriceOHLC and so on) take each field as a separate array in order, for example talib.ATR(records.High, records.Low, records.Close).
Moving average types (MAType)
Values of optInMAType, optInFastMAType and the other moving average type parameters; all default to 0 (SMA).
| Value | Moving average type |
|---|---|
0 | SMA (Simple Moving Average) |
1 | EMA (Exponential Moving Average) |
2 | WMA (Weighted Moving Average) |
3 | DEMA (Double Exponential Moving Average) |
4 | TEMA (Triple Exponential Moving Average) |
5 | TRIMA (Triangular Moving Average) |
6 | KAMA (Kaufman Adaptive Moving Average) |
7 | MAMA (MESA Adaptive Moving Average) |
8 | T3 (T3 Triple Exponential Moving Average) |
In this sectionRead the whole section
| Name | Description |
| Overlap Studies (18) | Indicators plotted on the same scale as price: moving averages, Bollinger Bands, parabolic SAR and similar. |
| Momentum Indicators (31) | Measure the speed and strength of price changes: MACD, RSI, stochastic oscillators (STOCH), ADX, CCI and similar. |
| Volume Indicators (3) | Combine price and volume to gauge money flow: AD, ADOSC and OBV. |
| Volatility Indicators (3) | Measure how far price moves: ATR, NATR and TRANGE. |
| Cycle Indicators (5) | Use the Hilbert transform to estimate the dominant cycle, phase and trend mode of price. |
| Price Transform (5) | Combine each bar's open, high, low and close into one price: average, median, typical and weighted close price, plus average deviation (AVGDEV). |
| Statistic Functions (9) | Compute statistics over a sliding window: beta, Pearson's correlation coefficient, linear regression, standard deviation, variance and time series forecast. |
| Math Transform (15) | Apply a math function to each element of an array: trigonometric functions, exponent, logarithm, rounding and square root. |
| Math Operators (11) | Element-wise addition, subtraction, multiplication and division of two arrays, plus the maximum, minimum, their indexes and the sum over a period. |
| Pattern Recognition (61) | Detect classic candlestick patterns: a non-zero value where the pattern appears (positive for bullish, negative for bearish, usually 100 or -100), otherwise 0. |