Update engine.py

This commit is contained in:
xldistance 2019-06-09 08:49:27 +08:00 committed by GitHub
parent 4f94988a6e
commit b79212c4d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -465,6 +465,7 @@ class CtaEngine(BaseEngine):
self.write_log(f"委托失败,找不到合约:{strategy.vt_symbol}", strategy) self.write_log(f"委托失败,找不到合约:{strategy.vt_symbol}", strategy)
return "" return ""
price = round_to(price,contract.pricetick) price = round_to(price,contract.pricetick)
volume = round_to(volume,contract.min_volume)
if stop: if stop:
if contract.stop_supported: if contract.stop_supported:
return self.send_server_stop_order(strategy, contract, direction, offset, price, volume, lock) return self.send_server_stop_order(strategy, contract, direction, offset, price, volume, lock)