def __init__(self, security, strategy, buying_ratio):
        ''' constructor '''

        self.__security=security
        self.__strategy=strategy
        self.start_date=strategy.start_date
        self.buying_ratio=buying_ratio

        # order id
        self.__stopOrderId=None
        self.__stopOrder=None
        self.__buyOrder=None

        self.__smaShort=Sma(10)
        self.__smaMid=Sma(60)
        self.__smaLong=Sma(200)
        self.__smaVolumeShort=Sma(10)
        self.__smaVolumeMid=Sma(60)
        self.__movingLowShort=MovingLow(10)
        self.__movingLowWeek=MovingLow(3)

        # state of previous day
        self.__previousTick=None
        self.__previousSmaShort=None
        self.__previousMovingLowShort=None
        self.__previousMovingLowWeek=None
        self.__previousSmaMid=None
        self.__previousSmaLong=None
        self.__previousSmaVolumeShort=None
        self.__previousSmaVolumeMid=None
def __init__ ( self , security , strategy , buying_ratio ) : self . __security = security self . __strategy = strategy self . start_date = strategy . start_date self . buying_ratio = buying_ratio self . __stopOrderId = None self . __stopOrder = None self . __buyOrder = None self . __smaShort = Sma ( 10 ) self . __smaMid = Sma ( 60 ) self . __smaLong = Sma ( 200 ) self . __smaVolumeShort = Sma ( 10 ) self . __smaVolumeMid = Sma ( 60 ) self . __movingLowShort = MovingLow ( 10 ) self . __movingLowWeek = MovingLow ( 3 ) self . __previousTick = None self . __previousSmaShort = None self . __previousMovingLowShort = None self . __previousMovingLowWeek = None self . __previousSmaMid = None self . __previousSmaLong = None self . __previousSmaVolumeShort = None self . __previousSmaVolumeMid = None
constructor