就是后台交易的时候,
预警记录有发出,
但是 模拟账户里面 没有交易
触发,价格0.00 这个是什么意思呢
没有用多账户, 就只是模拟账户
然后这个显示有 触发下单
但是,账户里面没有交易
if 平多条件 and tbuyholding(1)>0 then tsell(平多条件,1,mkt);
if 平空条件 and tsellholding(1)>0 then tsellshort(平空条件,1,mkt);
if tbuyholding(1)=0 and TSELLHOLDING(1)=0 and 开多条件 then tbuy(开多条件,1,mkt);
if tbuyholding(1)=0 and TSELLHOLDING(1)=0 and 开空条件 then tbuyshort(开空条件,1,mkt);
这个写法 和阿火的后台下单模板 两个有什么区别呢
1、楼上的写法是通过tbuyholding和tsellholding直接获取账户的实际持仓,而阿火的后台下单模块是通过全局变量来记录持仓的,是两种不同的获取持仓的方式。
2、不推荐秘籍中那种写法,这种写法没法准确获取实际持仓的。若要获取实际持仓,建议用tbuyholding等直接获取。