Indicators

33 built-in indicators. Add by id; each registry entry validates its own params.

Adding an indicator

const instanceId = chart.addIndicator('rsi', { period: 14 }, 'bottom')
chart.updateIndicator(instanceId, { period: 21 })
chart.removeIndicator(instanceId)

Overlay indicators

Drawn on the main price pane.

idName
smaSimple Moving Average
emaExponential Moving Average
wmaWeighted Moving Average
hullMaHull Moving Average
bollingerBandsBollinger Bands
keltnerChannelsKeltner Channels
donchianChannelsDonchian Channels
vwapVWAP
anchoredVwapAnchored VWAP
parabolicSarParabolic SAR
supertrendSupertrend
ichimokuIchimoku Kinko Hyo
pivotPointsPivot Points (Classic)
zigzagZigZag
linearRegressionChannelLinear Regression Channel

Panel indicators

Rendered in their own pane beneath the chart.

idName
rsiRelative Strength Index
macdMACD
stochasticStochastic
stochasticRsiStochastic RSI
atrAverage True Range
adxAverage Directional Index
cciCommodity Channel Index
mfiMoney Flow Index
williamsRWilliams %R
obvOn-Balance Volume
chaikinOscillatorChaikin Oscillator (exposes cumulative ADL)
awesomeOscillatorAwesome Oscillator
momentumMomentum
rocRate of Change
volumeVolume bars
volumeRocVolume Rate of Change
standardDeviationStandard Deviation
trixTRIX

Web Worker pipeline

For heavy indicator workloads, offload calculation off the render loop:

import { IndicatorWorkerHost } from '@tradecanvas/chart'

const host = new IndicatorWorkerHost()
await host.ping()
const result = await host.calculate('rsi', bars, { period: 14 })
host.terminate()

Pass null as the worker to use the synchronous fallback (SSR, tests).