pytdx h5导入时不排查成交为0的K线

This commit is contained in:
fasiondog 2024-09-03 00:29:05 +08:00
parent 094f124f98
commit e8cc23c0f3

View File

@ -287,7 +287,7 @@ def import_one_stock_data(connect, api, h5file, market, ktype, stock_record, sta
if today_datetime >= bar_datetime > last_datetime \
and bar['high'] >= bar['open'] >= bar['low'] > 0 \
and bar['high'] >= bar['close'] >= bar['low'] > 0 \
and int(bar['vol']) != 0 and int(bar['amount']*0.001) != 0:
and int(bar['vol']) >= 0 and int(bar['amount']*0.001) >= 0:
try:
row['datetime'] = bar_datetime
row['openPrice'] = bar['open'] * 1000