code: def __calculate_moving_average(self, date, row):
          
          cal_data = self.__serial_price(row)
          result = []
          for dummy in range(len(cal_data) - int(date) + 1):
              result.append(round(sum(cal_data[-date:]) / date, 2))
              cal_data.pop()
          result.reverse()
          cont = self.__cal_continue(result)
          return result, cont
docs: 計算移動平均數
  
              :param int row: 收盤價(6)、成交股數(1)
              :rtype: tuple (序列 舊→新, 持續天數)