等级: 超级版主
- 注册:
- 2021-5-24
- 曾用名:
|
知道了
你是监控多品种,那么全局变量要隔开,否者所有品种公用一个全局变量了
这么改动
cond:tsellholding(1)>0 or tbuyholding(1)>0;
if (currenttime>210000 or currenttime<050000) and TACCOUNT( 4)/TACCOUNT( 6)<-1/100 and EXTGBDATA(stklabel&'夜盘' )=0 and cond then
begin
tsell(1,0,mkt);
tsellshort(1,0,mkt);
EXTGBDATASET(stklabel&'夜盘',1);
END
if (currenttime>090000 and currenttime<120000) and TACCOUNT( 4)/TACCOUNT( 6)<-1/100 and EXTGBDATA(stklabel&'早盘' )=0 and cond then
begin
tsell(1,0,mkt);
tsellshort(1,0,mkt);
EXTGBDATASET(stklabel&'早盘',1);
END
if (currenttime>120000 and currenttime<150000) and TACCOUNT( 4)/TACCOUNT( 6)<-1/100 and EXTGBDATA(stklabel&'午盘' )=0 and cond then
begin
tsell(1,0,mkt);
tsellshort(1,0,mkt);
EXTGBDATASET(stklabel&'午盘',1);
END
if currenttime>145900 and currenttime<=150000 and cond then
begin
tsell(tsellholding(1)>0,0,mkt);
tsellshort(tbuyholding(1)>0,0,mkt);
EXTGBDATASET(stklabel&'夜盘',0);
EXTGBDATASET(stklabel&'早盘',0);
EXTGBDATASET(stklabel&'午盘',0);
END |
|