等级: 专业版
- 注册:
- 2022-1-11
- 曾用名:
|
麻烦帮我看一下多策略记录开平仓的语句,现在开仓可以,但是为什么平仓语句不触发?
//平空
IF ((CONDPK and abb) or min60ww) and EXTGBDATA(STKLABEL&'洋洋洋(沪锡1min后台)')>0 THEN
BEGIN
tsellshort (tsellholding(1)>0 ,EXTGBDATA(STKLABEL&'洋洋洋(沪锡1min后台)') ,MKT),ORDERQUEUE; //平空
EXTGBDATASET(STKLABEL&'洋洋洋(沪锡1min后台)',0);
end;
//开空
IF CONDKK and wpdk and tbc and abb THEN
BEGIN
tbuyshort(tbuyholding(1)= 0 and tsellholding(1)=0 ,ss,lmt,DYNAINFO(34)),ORDERQUEUE; //开空
EXTGBDATASET(STKLABEL&'洋洋洋(沪锡1min后台)',SS);
end;
//收盘平仓
if currenttime>=145700 and currenttime<=150000 AND EXTGBDATA(STKLABEL&'洋洋洋(沪锡1min后台)')>0 then
begin
tsell(1,EXTGBDATA(STKLABEL&'洋洋洋(沪锡1min后台)'),mkt);
tsellshort(1,EXTGBDATA(STKLABEL&'洋洋洋(沪锡1min后台)'),mkt);
END
|
|