
等级: 专业版
- 注册:
- 2022-8-5
- 曾用名:
|

楼主 |
发表于 2023-6-9 13:11
|
显示全部楼层
IF REF(BHT,1) OR REF(BHT1,1) OR REF(BHT2,1) OR REF(BHT3,1) OR REF(BHT4,1) and holding>0 THEN BEGIN
SELL(1,0,LIMITR,O-HD1*MINDIFF);
con:=0;
position:=0;
price:=0;
END
IF REF(BUYCOND,1) THEN BEGIN
if holding<0 then BEGIN
SELLSHORT(1,0,LIMITR,O+HD1*MINDIFF);
con:=0;
position:=0;
price:=0;
end
if position=0 and HOLDING=0 then BEGIN
BUY(1,CW%,LIMITR,O-HD*MINDIFF);
con:=con+1;
position:=1;
if con=1 then price:=open;
end
end
jdcd:=(ZG-price)/price>=ZY*0.2*con;
if position =1 and con<num and jdcd and holding>0 then BEGIN
buy(1,jcw%,market);
con:=con+1;
end
con值还是有问题,我没平仓con值归0是什么原因啊?
|
|