[bug fix]
This commit is contained in:
parent
df17ecccb4
commit
aa09f30f06
2
Q_n_A.md
2
Q_n_A.md
@ -50,7 +50,7 @@
|
|||||||
/usr/local/lib/libta_lib.so.0
|
/usr/local/lib/libta_lib.so.0
|
||||||
vi /etc/profile
|
vi /etc/profile
|
||||||
添加
|
添加
|
||||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib
|
||||||
source /etc/profile
|
source /etc/profile
|
||||||
|
|
||||||
9、数字货币的增量安装
|
9、数字货币的增量安装
|
||||||
|
@ -15,7 +15,7 @@ if __name__ == '__main__':
|
|||||||
mission.update({'id': str(uuid1())})
|
mission.update({'id': str(uuid1())})
|
||||||
mission.update({'templateName': u'TWAP 时间加权平均'})
|
mission.update({'templateName': u'TWAP 时间加权平均'})
|
||||||
mission.update({'direction': Direction.LONG})
|
mission.update({'direction': Direction.LONG})
|
||||||
mission.update({'vtSymbol': '518880'})
|
mission.update({'vt_symbol': '518880'})
|
||||||
mission.update({'is_stock': True})
|
mission.update({'is_stock': True})
|
||||||
mission.update({'totalVolume': 300})
|
mission.update({'totalVolume': 300})
|
||||||
mission.update({'target_price': 3.20})
|
mission.update({'target_price': 3.20})
|
||||||
|
@ -1158,7 +1158,7 @@ class TdxMdApi():
|
|||||||
|
|
||||||
self.symbol_exchange_dict = {} # tdx合约与vn交易所的字典
|
self.symbol_exchange_dict = {} # tdx合约与vn交易所的字典
|
||||||
self.symbol_market_dict = {} # tdx合约与tdx市场的字典
|
self.symbol_market_dict = {} # tdx合约与tdx市场的字典
|
||||||
self.symbol_vn_dict = {} # tdx合约与vtSymbol的对应
|
self.symbol_vn_dict = {} # tdx合约与vt_symbol的对应
|
||||||
self.symbol_tick_dict = {} # tdx合约与最后一个Tick得字典
|
self.symbol_tick_dict = {} # tdx合约与最后一个Tick得字典
|
||||||
|
|
||||||
self.registered_symbol_set = set()
|
self.registered_symbol_set = set()
|
||||||
@ -1691,22 +1691,22 @@ class TickCombiner(object):
|
|||||||
if (self.last_leg1_tick.ask_price_1 == 0 or self.last_leg1_tick.bid_price_1 == self.last_leg1_tick.limit_up) \
|
if (self.last_leg1_tick.ask_price_1 == 0 or self.last_leg1_tick.bid_price_1 == self.last_leg1_tick.limit_up) \
|
||||||
and self.last_leg1_tick.ask_volume_1 == 0:
|
and self.last_leg1_tick.ask_volume_1 == 0:
|
||||||
self.gateway.write_log(
|
self.gateway.write_log(
|
||||||
u'leg1:{0}涨停{1},不合成价差Tick'.format(self.last_leg1_tick.vtSymbol, self.last_leg1_tick.bid_price_1))
|
u'leg1:{0}涨停{1},不合成价差Tick'.format(self.last_leg1_tick.vt_symbol, self.last_leg1_tick.bid_price_1))
|
||||||
return
|
return
|
||||||
if (self.last_leg1_tick.bid_price_1 == 0 or self.last_leg1_tick.ask_price_1 == self.last_leg1_tick.limit_down) \
|
if (self.last_leg1_tick.bid_price_1 == 0 or self.last_leg1_tick.ask_price_1 == self.last_leg1_tick.limit_down) \
|
||||||
and self.last_leg1_tick.bid_volume_1 == 0:
|
and self.last_leg1_tick.bid_volume_1 == 0:
|
||||||
self.gateway.write_log(
|
self.gateway.write_log(
|
||||||
u'leg1:{0}跌停{1},不合成价差Tick'.format(self.last_leg1_tick.vtSymbol, self.last_leg1_tick.ask_price_1))
|
u'leg1:{0}跌停{1},不合成价差Tick'.format(self.last_leg1_tick.vt_symbol, self.last_leg1_tick.ask_price_1))
|
||||||
return
|
return
|
||||||
if (self.last_leg2_tick.ask_price_1 == 0 or self.last_leg2_tick.bid_price_1 == self.last_leg2_tick.limit_up) \
|
if (self.last_leg2_tick.ask_price_1 == 0 or self.last_leg2_tick.bid_price_1 == self.last_leg2_tick.limit_up) \
|
||||||
and self.last_leg2_tick.ask_volume_1 == 0:
|
and self.last_leg2_tick.ask_volume_1 == 0:
|
||||||
self.gateway.write_log(
|
self.gateway.write_log(
|
||||||
u'leg2:{0}涨停{1},不合成价差Tick'.format(self.last_leg2_tick.vtSymbol, self.last_leg2_tick.bid_price_1))
|
u'leg2:{0}涨停{1},不合成价差Tick'.format(self.last_leg2_tick.vt_symbol, self.last_leg2_tick.bid_price_1))
|
||||||
return
|
return
|
||||||
if (self.last_leg2_tick.bid_price_1 == 0 or self.last_leg2_tick.ask_price_1 == self.last_leg2_tick.limit_down) \
|
if (self.last_leg2_tick.bid_price_1 == 0 or self.last_leg2_tick.ask_price_1 == self.last_leg2_tick.limit_down) \
|
||||||
and self.last_leg2_tick.bid_volume_1 == 0:
|
and self.last_leg2_tick.bid_volume_1 == 0:
|
||||||
self.gateway.write_log(
|
self.gateway.write_log(
|
||||||
u'leg2:{0}跌停{1},不合成价差Tick'.format(self.last_leg2_tick.vtSymbol, self.last_leg2_tick.ask_price_1))
|
u'leg2:{0}跌停{1},不合成价差Tick'.format(self.last_leg2_tick.vt_symbol, self.last_leg2_tick.ask_price_1))
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.trading_day != tick.trading_day:
|
if self.trading_day != tick.trading_day:
|
||||||
|
Loading…
Reference in New Issue
Block a user