Sub-pane indicators render below the main price pane, sharing the same O(1) incremental checkpointing and TA-Lib seeding as overlays.
VOL (Volume)
- Defaults:
calcParams: [5, 10, 20](Neumaier-compensated SMA lines plotted over volume bars). - Coloring: Bars color bullish (
upColor) whenclose > open, bearish (downColor) whenclose < open, and neutral (noChangeColor) on flat closes. Axis floors atminValue: 0with abbreviated big-number formatting.
RSI (Relative Strength Index)
- Defaults:
calcParams: [6, 12, 24](three simultaneous RSI lines; note that thedivergencestudy uses singlersiPeriod = 14). - Formula: Wilder’s smoothing (matching TA-Lib
RSI).- Seeds
gainandlossas the mean of positive/negative bar-to-bar close changes over1..period. - Subsequent bars update
gain = (gain * (period - 1) + up) / periodandloss = (loss * (period - 1) + dn) / period. RSI = 100 * (gain / (gain + loss))(returns0when|gain + loss| < 1e-14).
- Seeds
MACD (Moving Average Convergence Divergence)
- Defaults:
calcParams: [12, 26, 9](fast = 12,slow = 26,signal = 9). - Outputs:
DIF(MACD line),DEA(signal line), andMACDhistogram bars (DIF - DEA; hollow stroke when rising bar-over-bar, solid fill when falling). - TA-Lib seeding nuance: Both
fastandslowEMAs seed at the same indexslow - 1(each taking the SMA of its own length ending atslow - 1). Signal EMA seedssignal - 1bars later, soDIF,DEA, and histogram begin together at barslow + signal - 2(33for12/26/9), matching TA-Lib exactly.
ATR (Average True Range)
- Defaults:
calcParams: [14],minValue: 0. - Formula: True Range
TR[i] = max(h[i] - l[i], |h[i] - c[i - 1]|, |l[i] - c[i - 1]|). Seeds at barperiodwithmean(TR[1..period]), then applies Wilder’s smoothingatr = (prev * (period - 1) + TR) / period.
ADX (Average Directional Index)
- Defaults:
calcParams: [14], bounded[0, 100]. - Outputs:
ADX(bright),+DI(green),-DI(red). - Formula: Standard Wilder directional movement (
+DM,-DM,TRsmoothed bysm = sm - sm / period + valstarting from theperiod-bar sum at barperiod):+DI = 100 * (smPdm / smTr),-DI = 100 * (smMdm / smTr).DX = 100 * |+DI - -DI| / (+DI + -DI).ADXseeds at bar2 * period - 1(27for period14) with theperiod-bar mean ofDX, then applies Wilder’s RMA.
STOCHRSI (Stochastic RSI)
- Defaults:
calcParams: [14, 14, 3, 3](rsiPeriod = 14,stochPeriod = 14,kSmooth = 3,dSmooth = 3), short labelSRSI, bounded[0, 100]. - Outputs:
%K(accent) and%D(warn). - Formula:
- Computes Wilder
RSI(rsiPeriod). - Over each rolling
stochPeriodwindow of RSI (first = rsiPeriod + stochPeriod - 1), computesraw = 100 * (rsi[i] - minRsi) / (maxRsi - minRsi)(0ifmaxRsi - minRsi <= 1e-14). %K = SMA(raw, kSmooth)and%D = SMA(%K, dSmooth)using Neumaier-compensated rolling sums.
- Computes Wilder
OBV (On-Balance Volume)
- Defaults:
calcParams: [20](sigPeriod = 20SMA signal line). - Outputs:
OBV(accent solid) andMA(dim dashed20-bar SMA of OBV), formatted with big-number abbreviations. - Formula: Starts at
v[0], adding+v[i]whenc[i] > c[i - 1],-v[i]whenc[i] < c[i - 1], and0on unchanged closes via Neumaier-compensated summation so multi-month streams remain drift-free.