tactician
v0.3.0
Published
Lightweight trading indicators designed for technical analysts' use
Downloads
4
Maintainers
Readme
tactician
Boost your trading analysis capabilities in Node.js with our comprehensive collection of customizable indicators
Currently available indicators
- RSI (Relative Strength Index)
- OBV (On Balance Volume)
Planned future indicators (todo)
- STOCH (Stochastic Oscillator)
- MACD (Moving Average Convergence Divergence)
- MA (Moving Averages)
- ATR (Avarage True Range)
Installation
install npm package
pnpm
pnpm i tactician // or npm
yarn
yarn i tactician
Import
import { rsi, obv } from 'tactician'
Example
const ohlcData = [
{ open: 10, high: 12, low: 11, close: 1, volume: 10 },
{ open: 10, high: 12, low: 11, close: 2, volume: 10 },
// Add more OHLC data as needed
];
const rsiResults = rsi(ohlcData); // Returns [57.14, 62.86 ...]
const obvResults = obv(ohlcData); // Returns [10, 20 ...]
const stochResults = stoch(ohlcData); // Returns [ 66.67, 0 ... ]
const macdResults = stoch(ohlcData); // Returns [ 0.03, 0.04 ... ]
Contribute
If you have a feature request then feel free to start a new issue, or just grab existing one.
License
MIT