Esempio n. 1
0
def run():
    print "start dualcross"
    client = DualCross()
    BfRun(client,
          clientId=client.clientId,
          tickHandler=client.tickHandler,
          tradeHandler=client.tradeHandler,
          logHandler=client.logHandler,
          symbol=client.symbol,
          exchange=client.exchange)
Esempio n. 2
0
            self.CntBar[symbol][period_key].period = self.PERIOD[period_key]
            self.CntBar[symbol][period_key].actionDate = dt.datetime.strftime(
                dt_bar[period_key], "%Y%m%d")
            self.CntBar[symbol][period_key].barTime = dt.datetime.strftime(
                dt_bar[period_key], "%H:%M:%S")
            self.CntBar[symbol][period_key].openPrice = self.CntBar[symbol][
                'M01'].openPrice
            self.CntBar[symbol][period_key].highPrice = self.CntBar[symbol][
                'M01'].highPrice
            self.CntBar[symbol][period_key].lowPrice = self.CntBar[symbol][
                'M01'].lowPrice
            self.CntBar[symbol][period_key].closePrice = self.CntBar[symbol][
                'M01'].closePrice
            self.CntBar[symbol][period_key].volume = self.CntBar[symbol][
                'M01'].volume
            self.CntBar[symbol][period_key].openInterest = self.CntBar[symbol][
                'M01'].openInterest
            self.CntBar[symbol][period_key].lastVolume = self.CntBar[symbol][
                'M01'].lastVolume


if __name__ == '__main__':
    client = DataRecorder_Multi()
    BfRun(client,
          clientId=client.clientId,
          tickHandler=client.tickHandler,
          tradeHandler=client.tradeHandler,
          logHandler=client.logHandler,
          symbol=client.symbol,
          exchange=client.exchange)