读取都可以读取,但不建议在图表交易中用到这类没有历史值.
延迟下单的话用全局变量EXTGBDATASET(S,X)记录下满足条件时的时间,然后和当前时间做判断.也不建议用在图表上的.
要使用的话类似下面这个提前下单模版自己套用下
abb:=(time0-timetot0(dynainfo(207))<=tq) or not(islastbar);
if abb then begin
if holding>0 and ma5<ma10 then sell(1,1,thisclose);
if holding<0 and ma5>ma10 then sellshort(1,1,thisclose);
if holding=0 and ma5>ma10 then buy(1,1,thisclose);
if holding=0 and ma5<ma10 then buyshort(1,1,thisclose);
end
和你信号闪烁没有关系,只需记录满足条件那次的时间然后做比较啊。
if 开多条件 then EXTGBDATASET('S',currenttime);
if currenttime+10>EXTGBSTRING('S') then buy(账户1);
if currenttime+20>EXTGBSTRING('S') then buy(账户2);
前面写粗了,要指定账户的话要用后台tbuy函数
如果图表的话的只能在交易-图表程序化交易-多账户系数配置这里设定不同账户执行不同的策略,你把一个模型复制成几分给不同的账户用
if 开多条件 then EXTGBDATASET('S',currenttime); if currenttime+10>EXTGBSTRING('S') then buy(账户1); if currenttime+20>EXTGBSTRING('S') then buy(账户2); |
我提出的问题是,在图表多账户交易情况下,如何实现同一个信号,对不同账户的下单时间用延迟办法错开
//这个图表是很难实现的,因为图表不能指定账户下单! 建议您最好使用后台程序