UNPKG

quant-zero

Version:

Node-Quant is a powerful Node.js package for developing and testing quantitative trading strategies in cryptocurrency markets, offering tools for backtesting and performance analysis.

20 lines (18 loc) 527 B
import { parseIntoRows } from '@/utils/parseOHLCV' import { OHLCV } from 'ccxt' import { ChartingSystem } from '@/lib' import ta from 'technicalindicators' export class CandleSticks extends ChartingSystem { public transform(rawData: OHLCV[]): ta.CandleList { const { opens, highs, lows, closes, timestamps, volumes } = parseIntoRows(rawData) return { open: opens, high: highs, low: lows, close: closes, timestamp: timestamps, volume: volumes, } } }