Notebook
def next(self): if (self.sma1[-2] < self.sma2[-2] and self.sma1[-1] > self.sma2[-1]): self.buy() elif (self.sma1[-2] > self.sma2[-2] and self.sma1[-1] < self.sma2[-1]): self.sell()