[PEL] 复制代码 ma1:ma(c,5);
ma2:ma(c,10);
//交易条件
开多:=cross(ma1,ma2);
开空:=cross(ma2,ma1);
if 开多=1 and tbuyholdingex('','',2)=0 then begin
tbuy(1,1,mkt);
end
if 开空=1 and tsellholdingex('','',2)=0 then begin
tbuyshort(1,1,mkt);
end
if c-tavgenterpriceex2('','',0)>10*mindiff and tbuyholdingex('','',1)>0 then begin
tsell(1,0,mkt);
end
if tavgenterpriceex2('','',1)-c>10*mindiff and tsellholdingex('','',1)>0 then begin
tsellshort(1,0,mkt);
end |