class Strategy_CycleEMA_Base(StrategyBase) : def __init__(self ,symbol ,np_arr_dic ,df) : StrategyBase.__init__(self ,symbol ,np_arr_dic ,df) self.ema5 = ta.EMA(self.c ,5) self.ema20 = ta.EMA(self.c ,20) self.ema40 = ta.EMA(self.c ,40) self.ema120 = ta.EMA(self.c ,120) self.ema240 = ta.EMA(self.c ,240) self.stage = np.array(list(map(lambda s ,m ,l : 1 if s > m and m > l else \ 2 if m > s and s > l
