[HandlerName("Rate of Change")] [HandlerCategory("vvIndicators")] public class ROC : BasePeriodIndicatorHandler, IDouble2DoubleHandler { // Rate of Change public static IList GenROC(IList src, int period) { var roc = new double[src.Count]; for (int i = period; i < src.Count; i++) { roc[i] = ((src[i] - src[i - period]) / src[i - period]) * 100; } return roc; } public IList Execute(IList source) { return GenROC(source, Period); } }