 
等级: 超级版主
- 注册:
- 2021-5-18
- 曾用名:
- FireScript
|
zscond1:=tbuyholdingex('529001041','pg2402',2)>0 and tavgenterpriceex2('529001041','pg2402',0)-c>hz;
zscond2:=tsellholdingex('529001041','pg2402',2)>0 and c-tavgenterpriceex2('529001041','pg2402',1)>hz;
if gdcond1 then begin
tsell(tbuyholdingex('529001041','pg2402',2)>0,0,mkt),orderqueue;
tbuyshort(tsellholdingex('529001041','pg2402',2)=0 and tbuyholdingex('529001041','pg2402',2)=0,ss,mkt),orderqueue;
end
if gdcond2 then begin
tsellshort(tsellholdingex('529001041','pg2402',2)>0,0,mkt),orderqueue;
tbuy(tsellholdingex('529001041','pg2402',2)=0 and tbuyholdingex('529001041','pg2402',2)=0,ss,mkt),orderqueue;
end
if ddcond3 then begin
tsell(tbuyholdingex('529001041','pg2402',2)>0,0,mkt),orderqueue;
tbuyshort(tsellholdingex('529001041','pg2402',2)=0 and tbuyholdingex('529001041','pg2402',2)=0,ss,mkt),orderqueue;
end
if ddcond4 then begin
tsellshort(tsellholdingex('529001041','pg2402',2)>0,0,mkt),orderqueue;
tbuy(tsellholdingex('529001041','pg2402',2)=0 and tbuyholdingex('529001041','pg2402',2)=0,ss,mkt),orderqueue;
end
if zscond1 then tsell(1,0,mkt);
if zscond2 then tsellshort(1,0,mkt);
开仓地方再限制下吧 |
|