请问,后台交易多策略时,我是用一个策略不同参数来控制不同周期交易形成多策略,里面的全局变量,是只影响一个策略的,还是多策略之间会共用,因为我用全局变量来控制开平仓必须先交易完成后再顺序下单。程序如下
if Z>0 and tenterbars(1)>0 then begin
tsell(sellcond and tbuyholding(1)>0,tbuyholding(1),mkt);
if tholding2=0 then extgbdataset('orderdone',0);
tbuyshort (buyshortcond and extgbdata('orderdone')=0 and tholding2=0,1,mkt);
extgbdataset('orderdone',1);
tsellshort(sellshortcond and tsellholding(1)>0,tsellholding(1),mkt);
if tholding2=0 then extgbdataset('orderdone',0);
tbuy(buycond and extgbdata('orderdone')=0 and tholding2=0,1,mkt);
extgbdataset('orderdone',0);
即多个策略里的orderdone是联通共用的,还是只对自己策略的
我是指比如这个程序,我做的策略是A(1,3),后面又做了一个策略A(1,5),这两个策略是一样的程序,只是参数不一样,那里面的orderdone是为各自策略服务,还是共通的,即A(1,3)产生的orderdone值对A(1,5)也产生作用
这种全局变量是软件内通用的,
这种全局变量不分策略的,是共通的
好的,谢谢