code: def update(self):
          
          # Update the simulated pricing data
          self.t += 1000 / INTERVAL
          self.average *= np.random.lognormal(0, 0.04)
  
          high = self.average * np.exp(np.abs(np.random.gamma(1, 0.03)))
          low = self.average / np.exp(np.abs(np.random.gamma(1, 0.03)))
          delta = high - low
          open = low + delta * np.random.uniform(0.05, 0.95)
          close = low + delta * np.random.uniform(0.05, 0.95)
          color = "darkgreen" if open < close else "darkred"
  
          for k, point in [('time', self.t),
                           ('average', self.average),
                           ('open', open),
                           ('high', high),
                           ('low', low),
                           ('close', close),
                           ('color', color)]:
              self.data[k].append(point)
  
          ema12 = self._ema(self.data['close'], self.kernel12)
          ema26 = self._ema(self.data['close'], self.kernel26)
          macd = ema12 - ema26
  
          self.data['ma'].append(ema12)
          self.data['macd'].append(macd)
  
          macd9 = self._ema(self.data['macd'], self.kernel9)
  
          self.data['macd9'].append(macd9)
          self.data['macdh'].append(macd - macd9)
docs: Compute the next element in the stream, and update the plot data