ROC with Bands
Rate of Change (ROC) with Bands, created by Vitali Apirine, is a volatility banded variant of Rate of Change (ROC). [Discuss] 💬
// usage IEnumerable<RocWbResult> results = quotes.GetRocWb(lookbackPeriods, emaPeriods, stdDevPeriods);
int - Number of periods (
N) to go back. Must be greater than 0. Typical values range from 10-20.
int - Number of periods for the ROC EMA line. Must be greater than 0. Standard is 3.
int - Number of periods the standard deviation for upper/lower band lines. Must be greater than 0 and not more than
lookbackPeriods. Standard is to use same value as
Historical quotes requirements
You must have at least
N+1 periods of
quotes to cover the warmup periods.
quotes is a collection of generic
TQuote historical price quotes. It should have a consistent frequency (day, hour, minute, etc). See the Guide for more information.
- This method returns a time series of all available indicator values for the
- It always returns the same number of elements as there are in the historical quotes.
- It does not return a single incremental indicator value.
- The first
Nperiods will have
nullvalues for ROC since there’s not enough data to calculate.
DateTime - Date from evaluated
double - Rate of Change over
N lookback periods (%, not decimal)
double - Exponential moving average (EMA) of
double - Upper band of ROC (overbought indicator)
double - Lower band of ROC (oversold indicator)
See Utilities and helpers for more information.
This indicator may be generated from any chain-enabled indicator or method.
// example var results = quotes .Use(CandlePart.HL2) .GetRocWb(..);
Results can be further processed on
Roc with additional chain-enabled indicators.
// example var results = quotes .GetRocWb(..) .GetEma(..);