Calculates the Chaikin Oscillator (CO) for the full window.
Steps:
shortPeriod AD values using short model.Slice of highs.
Slice of lows.
Slice of closes.
Slice of volumes.
Short AD period length.
Previous AD seed (0.0 if none).
Model for the short AD average.
Model for the long AD average.
[oscillatorValue, lastAD].
https://tech.centaurresearchtechnologies.com/indicators/momentum-indicators/chaikin-oscillator/ Explanation and interactive playground
Calculates the Chande Momentum Oscillator (CMO) for the full window.
Uses sums of positive/negative price differences to produce a value in [-100, 100]. Special cases:
Slice of prices (length >= 1).
CMO value in [-100, 100].
https://tech.centaurresearchtechnologies.com/indicators/momentum-indicators/chande-momentum-oscillator/ Explanation and interactive playground
Calculates the Commodity Channel Index (CCI) for the full window.
Formula:
Slice of prices (length >= 1).
Central model (SMA, EMA, median, etc.).
Deviation model (StdDev, MAD, etc.).
Scale factor (normally 0.015).
CCI value (unitless).
https://tech.centaurresearchtechnologies.com/indicators/momentum-indicators/commodity-channel-index/ Explanation and interactive playground
Calculates the MACD line for the full window.
Short-period average is computed over the last shortPeriod values, while
the long-period average uses the entire series, each with the respective model.
Slice of prices (length >= 1).
Length of the short period (must be < prices.length).
Model for short average.
Model for long average (over full series).
MACD value (short - long).
https://tech.centaurresearchtechnologies.com/indicators/momentum-indicators/macd/ Explanation and interactive playground
Calculates the McGinley Dynamic CCI for the full window.
Uses the McGinley Dynamic of the last price as the center and scales by the chosen deviation model. Returns both the CCI and the computed McGinley value.
Slice of prices (length >= 1).
Previous McGinley value (use 0.0 if none).
Deviation model (StdDev, MAD, etc.).
Scale factor (normally 0.015).
[cci, mcginleyDynamic].
https://tech.centaurresearchtechnologies.com/indicators/momentum-indicators/mcginley-dynamic-commodity-channel-index/ Explanation and interactive playground
Calculates the McGinley Dynamic MACD for the full window.
Returns a tuple:
Slice of prices (length >= 1).
Short period length (must be < prices.length).
Previous short McGinley (0.0 if none).
Previous long McGinley (0.0 if none).
[macd, shortMcginley, longMcginley].
https://tech.centaurresearchtechnologies.com/indicators/momentum-indicators/mcginley-dynamic-macd/ Explanation and interactive playground
Calculates the Money Flow Index (MFI) for the full window.
Notes:
Slice of prices (length >= 1).
Slice of volumes (same length as prices).
MFI value in [0, 100].
https://tech.centaurresearchtechnologies.com/indicators/momentum-indicators/money-flow-index/ Explanation and interactive playground
Calculates the On-Balance Volume (OBV) update.
Adds/subtracts current volume if price up/down vs previous price, and accumulates with previous OBV.
Current price.
Previous price.
Current volume.
Previous OBV seed (use 0 if none).
Updated OBV value.
https://tech.centaurresearchtechnologies.com/indicators/momentum-indicators/on-balance-volume/ Explanation and interactive playground
Calculates the Percentage Price Oscillator (PPO) for the full window (%).
Uses chosen central model for both short (applied to the trailing short slice) and long (applied to the full window), then scales the difference by long.
Slice of prices (length >= 1).
Length of the short period (must be <= prices.length).
Central model for both averages.
PPO percentage.
https://tech.centaurresearchtechnologies.com/indicators/momentum-indicators/percentage-price-oscillator/ Explanation and interactive playground
Calculates the Rate of Change (RoC) between two prices.
Current price.
Previous price.
Percentage change: ((current - previous)/previous) * 100.
https://tech.centaurresearchtechnologies.com/indicators/momentum-indicators/rate-of-change/ Explanation and interactive playground
Calculates the Relative Strength Index (RSI).
Computes average gains and losses from consecutive price differences and forms the RSI using the selected central model to smooth/aggregate:
Special cases:
Slice of prices (length >= 1).
Central model used to aggregate gains/losses.
RSI value in [0, 100].
const rsi = momentumIndicators.single.relativeStrengthIndex(
prices,
ConstantModelType.SmoothedMovingAverage
);
https://tech.centaurresearchtechnologies.com/indicators/momentum-indicators/rsi/ Explanation and interactive playground
Calculates the MACD signal line for the full window.
Applies the chosen central model to the provided MACD values.
Slice of MACD values (length >= 1).
Central model (SMA, EMA, median, etc.).
Signal value.
https://tech.centaurresearchtechnologies.com/indicators/momentum-indicators/macd/ Explanation and interactive playground
Calculates the Slowest Stochastic as a smoothing of Slow Stochastic values.
Uses the provided central model to aggregate the given slow stochastics.
Slice of Slow Stochastic values (length >= 1).
Central model (SMA, EMA, median, etc.).
Slowest stochastic value.
https://tech.centaurresearchtechnologies.com/indicators/momentum-indicators/slow-stochastic-oscillator/ Explanation and interactive playground
Calculates the Slow Stochastic as a smoothing of Stochastic Oscillator values.
Uses the provided central model to aggregate the given stochastics.
Slice of Stochastic Oscillator values (length >= 1).
Central model (SMA, EMA, median, etc.).
Smoothed stochastic value.
https://tech.centaurresearchtechnologies.com/indicators/momentum-indicators/slow-stochastic-oscillator/ Explanation and interactive playground
Calculates the Stochastic Oscillator for the full window.
Interpretation:
Slice of prices (length >= 1).
Percent value in [0, 100].
https://tech.centaurresearchtechnologies.com/indicators/momentum-indicators/stochastic-oscillator/ Explanation and interactive playground
Calculates the Williams %R for the full window.
Slice of highs.
Slice of lows.
Close price for the observed period (last bar’s close).
%R value in [-100, 0].
https://tech.centaurresearchtechnologies.com/indicators/momentum-indicators/williams-percent-r/ Explanation and interactive playground
Single-value momentum indicators. These compute a single value from a full window (the entire array passed in).