4.64K 浏览
0

买涨:order = api.insert_order(symbol=code, direction= 'BUY' ,offset= 'OPEN':, volume=new_hand,imit_price=price)
卖涨:order = api.insert_order(symbol=code, direction="SELL", limit_price=price,offset="CLOSETODAY", volume=new_hand)
买跌:order = api.insert_order(symbol=code, direction="SELL", limit_price=price,offset="OPEN", volume=new_hand)
卖跌:order = api.insert_order(symbol=code, direction="BUY", limit_price=price,offset="CLOSE", volume=new_hand)
总收益:'position_profit'
总花费保证金:'margin’

聪 王 已回答的问题 2020年1月2日
0

策略编程服务(有偿):QQ:2163244320

聪 王 已回答的问题 2020年1月2日
0

首先你里面有涉及到自己的参数设定,这点需要你自己判断

其次,你买卖的每次offset有些许初入要结合你的仓位和合约对象去看,比如有些交易所是不支持平今指令等

第三,建议可以直接快期模拟或simnow模拟账户进行测试,看看模拟实盘会有什么问题

小 明 发表新评论 2019年12月10日

谢谢啦。。