roc static method
Implementation
static List<double?> roc(List<TaBar> points, {int period = 12}) {
final n = points.length;
final out = List<double?>.filled(n, null);
for (int i = period; i < n; i++) {
final past = points[i - period].close;
if (past != 0) out[i] = (points[i].close - past) / past * 100;
}
return out;
}