def __init__(self, feed, instrument, short_l, mid_l, long_l, up_cum):
    strategy.BacktestingStrategy.__init__(self, feed)
    self.__instrument = instrument
    self.getBroker().setFillStrategy(DefaultStrategy(None))
    self.getBroker().setCommission(TradePercentage(0.001))
    self.__position = None
    self.__prices = feed[instrument].getPriceDataSeries()
    self.__malength1 = int(short_l)
    self.__malength2 = int(mid_l)
    self.__malength3 = int(long_l)
    self.__circ = int(up_cum)
    self.__ma1 = ma.SMA(self.__prices, self.__malength1)
    self.__ma2 = ma.SMA(self.__prices, self.__malength2)
    self.__ma3 = ma.SMA(self.__prices, self.__malength3)
def __init__(self, feed, instrument, short_l, mid_l, long_l, up_cum):
    strategy.BacktestingStrategy.__init__(self, feed)
    self.__instrument = instrument
    self.getBroker().setFillStrategy(DefaultStrategy(None))
    self.getBroker().setCommission(TradePercentage(0.001))
    self.__position = None
    self.__prices = feed[instrument].getPriceDataSeries()
    self.__malength1 = int(short_l)
    self.__malength2 = int(mid_l)
    self.__malength3 = int(long_l)
    self.__circ = int(up_cum)
    self.__ma1 = ma.SMA(self.__prices, self.__malength1)
    self.__ma2 = ma.SMA(self.__prices, self.__malength2)
    self.__ma3 = ma.SMA(self.__prices, self.__malength3)