code: def __init__(self, feed, instrument, smaPeriod):
      super(SMACrossOver, self).__init__(feed)
      self.__instrument = instrument
      self.__position = None
      # We'll use adjusted close values instead of regular close values.
      self.setUseAdjustedValues(True)
      self.__prices = feed[instrument].getPriceDataSeries()
      self.__sma = ma.SMA(self.__prices, smaPeriod)
  
file_path: pyalgotrade/samples/sma_crossover.py
imports: from pyalgotrade import strategy
  from pyalgotrade.technical import ma
  from pyalgotrade.technical import cross
label_desc: Use image node_id 1 to create a new SMACrossOver object from inherited base classes: strategy with example: obj = SMACrossOver(feed, instrument, smaPeriod)