VeighNa量化社区
你的开源社区量化交易平台
Member
avatar
加入于:
帖子: 16
声望: 0

我跟踪了一下源码,发现只有限价单的委托函数,没有市价单的函数,请问如何在策略里委托一个市价单??

if stop:
        if contract.stop_supported:
            return self.send_server_stop_order(strategy, contract, direction, offset, price, volume, lock)
        else:
            return self.send_local_stop_order(strategy, direction, offset, price, volume, lock)
    else:
        return self.send_limit_order(strategy, contract, direction, offset, price, volume, lock)
Administrator
avatar
加入于:
帖子: 4502
声望: 321

CTA策略引擎并不支持市价单,硬要用的话可以自己强行修改send_limit_order函数,把其中的OrderType改为MARKET就行

© 2015-2022 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号

沪公网安备 31011502017034号

【用户协议】
【隐私政策】
【免责条款】