calcMAC static method

void calcMAC(
  1. List<KLineEntity> dataList,
  2. int n
)

Implementation

static void calcMAC(List<KLineEntity> dataList, int n) {
  if (dataList.isNotEmpty) {
    for (int i = 0; i < dataList.length; i++) {
      KLineEntity entity = dataList[i];
      entity.mac_high = entity.mac_high;
      entity.mac_upper = entity.mac_upper;
      entity.mac_low = entity.mac_low;
      entity.mac_lower = entity.mac_lower;
      entity.mac_high_1 = entity.mac_high_1;
      entity.mac_upper_1 = entity.mac_upper_1;
      entity.mac_low_1 = entity.mac_low_1;
      entity.mac_lower_1 = entity.mac_lower_1;
      entity.moving_average = entity.moving_average;
      entity.top_box = entity.top_box;
      entity.bottom_box = entity.bottom_box;
    }
  }
}