currentPeriods method

List<int> currentPeriods(
  1. IndicatorType type
)

Implementation

List<int> currentPeriods(IndicatorType type) {
  if (type == IndicatorType.kdj) {
    return kdjPeriods;
  } else if (type == IndicatorType.macd) {
    return macdPeriods;
  } else if (type == IndicatorType.rsi) {
    return rsiPeriods;
  } else if (type == IndicatorType.wr) {
    return wrPeriods;
  } else if (type == IndicatorType.obv) {
    return [0];
  }
  return [];
}