def formatbasicbar_day(x): # tradingday,open,high,low,close,volume,openint try: tmp0 = tri_poly(x[0]) if (tmp0 is not None): re = myBasicBar(tmp0,x[1],x[2],x[3],x[4],x[5],x[6], None, 86400) else: return except Exception as e: logger.error("formatbasicbar_day failed|%s" % e.args[0]) return return re
def formatbasicbar_60(x): # tradingday,updatetime,open,high,low,close,volume,openint,sgnvol try: tmp = x[1].strip().split(':') tmp0 = formdatetime_60(x[0], int(tmp[0]), int(tmp[1])) # tmp1 = dtime.datetime(tmp0[0],tmp0[1],tmp0[2],tmp0[3],tmp0[4]) if (tmp0 is not None): re = myBasicBar(tmp0,x[2],x[3],x[4],x[5],x[6],x[7],x[8]) else: return except Exception as e: logger.error("formatbasicbar_60 failed|%s" % e.args[0]) return return re