Indicator Catalog
This page lists indicators produced by the shared indicator pipeline and consumed by strategy runtime.
Primary implementation:
@tradejs/core/indicators
1. Base Indicator Snapshot
Per-bar IndicatorSnapshot fields:
maFast,maMedium,maSlow(SMA)atratrPct(ratio of short ATR% SMA to long ATR% SMA)bbUpper,bbMiddle,bbLowerobv,smaObvmacd,macdSignal,macdHistogramprice1hPcnt,price24hPcnthighPrice1h,lowPrice1h,volume1hhighPrice24h,lowPrice24h,volume24hhighLevel,lowLevelprevClosecorrelation(coin vs BTC over correlation window)spread(smoothed Binance/Coinbase BTC spread when available)
2. History Snapshot Keys
IndicatorsHistorySnapshot stores rolling arrays of the same fields above (maFast[], atr[], bbUpper[], ...).
Strategies usually access:
- full snapshot (
indicatorsState.snapshot()) - latest scalar (
indicatorsState.latestNumber('<key>'))
3. ML Candle Payload
When ML payload is enabled, snapshot also includes candle windows:
candles15m,candles1h,candles4h,candles1dbtcCandles15m,btcCandles1h,btcCandles4h,btcCandles1d
4. Multi-Timeframe Indicator Series
The shared indicator pipeline builds extra timeframe series for ML using suffixes:
*1h*4h*1d
For BTC context, keys are prefixed with btc (btcMaFast, btcMaFast1h, etc).
5. Built-In Indicator Helpers
From @tradejs/core/indicators:
MOM: momentum (price - price[period])smaAligned: SMA with alignment to source length/warmupATR_PCT: ATR%, short/long SMA lines, and short/long ratiocreateSpreadSmoother,smoothSpreadSeries: moving smoothed spread
6. Plugin Indicators
Indicator plugins are registered via registry:
registerIndicatorEntriesgetRegisteredIndicatorEntries
Each plugin may provide:
- indicator metadata for UI/catalog
- compute function (adds custom series into indicator history)
- optional renderer for figures
7. Config Mapping
Default periods are controlled by strategy config keys (shared names):
MA_FAST,MA_MEDIUM,MA_SLOWOBV_SMAATR,ATR_PCT_SHORT,ATR_PCT_LONGBB,BB_STDMACD_FAST,MACD_SLOW,MACD_SIGNALLEVEL_LOOKBACK,LEVEL_DELAY
If a strategy has these keys, runtime uses them to initialize indicator periods.