AlgoLift Indicators. 217 indicators in one TypeScript package.
Moving averages, momentum, trend, volatility, volume, cycles, statistics, regression and 63 candlestick patterns. One API, no dependencies.
217
| 63 | Candlestick patterns | |
| 40 | Momentum | |
| 27 | Moving averages | |
| 17 | Volume | |
| 16 | Trend strength | |
| 15 | Statistics | |
| 14 | Volatility | |
| 25 | Five more families |
One package, one API, nothing to compile.
- TypeScript-native
- Types for every function and option, including each default and range.
- No dependencies
- Plain JavaScript once installed. Nothing native to build, nothing extra pulled in.
- Node and the browser
- ES module and CommonJS builds for Node 18 and up. The same code runs in AlgoLift’s charts in your browser.
- One API for all 217
- Every function takes bars and options and returns one value per bar for each output. You can also call any indicator by its id with calculate.
- A catalog entry for each
- Name, settings with defaults and ranges, outputs, and the columns it reads, all in the exported catalog.
- The builder’s own code
- AlgoLift’s strategy builder and charts use this package, so the app has one copy of each formula.
A number in six lines.
import { rsi, bbands, cdlEngulfing } from '@algolift/indicators';const bars = await loadBars();// oldest firstconst { value } = rsi(bars, { period: 14 });// (number | null)[]const { upper_band, lower_band } = bbands(bars);// 20 bars, 2 deviationsconst { value: engulfing } = cdlEngulfing(bars);// 100, -100, 80, -80 or 0
- Output
- One value per bar, in the same order as your bars.
- Warmup
- Null until the indicator has enough bars. Never NaN or infinity.
- Mistakes
- Bad input throws an error that says why, instead of returning wrong numbers.
- Your input
- Never changed.
405,424
values in 671 test cases, checked on every change. Each indicator has test cases at three or more settings: the exact values it must produce on 400 fixed bars.
How close is close enough
| 159 | Exact. 159 indicators match their reference values to the last digit. |
| 44 | Within 1e−9. 44 differ only in the last digits, because the sums are added in a different order. |
| 2 | A stated tolerance. 2 have a looser limit, and their catalog entry says why. |
| 12 | A stated convention. 12 classics follow a convention, and their page says which. |
| Every indicator against its reference values. | Node LTS, on every change. | 217 indicators | |
| Every reference value rebuilt from scratch, byte for byte. | From pinned versions. | 671 test cases |
Reference values come from established libraries (TA-Lib, pandas-ta-classic, pandas-ta and technicalindicators), and their licenses ship with the package in NOTICE.
Twelve classics, and the choice each one makes.
These are the formulas AlgoLift’s strategy nodes run, so they never change to suit anyone. Where a classic indicator has to make a choice, like how it starts or what a flat stretch reads, we say so here, and the tests hold it to that.
| Indicator | Its convention |
|---|---|
| KAMA | Starts from the average of the bars before its first value. |
| MACD | Each average starts on the first bars of the series, so the line begins at bar slow − 1. |
| Stochastic | A window with no range has no %K, so no %D either. |
| Williams %R | A window with no range has no value. |
| CMO | Adds up the window’s gains and losses, as Chande defined it. |
| ADX / DMI | Starts its smoothing from sums over the first period of bars. |
| Aroon | Looks back over the last period bars, including today. |
| Parabolic SAR | Starts long, from the first bar’s low. |
| ATR | Starts at bar period − 1. The first bar’s true range is its high minus its low. |
| Chaikin Oscillator | Each average starts from the simple average of its first values. |
| MFI | A window with no money flow either way reads 50. |
| OBV | Starts at 0 on the first bar. |
Browse all 217.
| Function | Indicator | Settings | Outputs | Check |
|---|
Loading the index.
Or use them without writing code. AlgoLift’s strategy builder runs this package.
7-day free trial. Cancel anytime.
