编写中请稍等
ma5:ma(c,5);
ma10:ma(c,10);
jc:cross(ma5,ma10);
sc:cross(ma10,ma5);
dzs:=ENTERPRICE-l>=20;
kzs:=h-enterprice>=20;
if jc then begin
sellshort(holding<0,holding,marketr);
buy(holding=0,1,marketr);
end
if sc then begin
sell(holding>0,holding,marketr);
buyshort(holding=0,1,marketr);
end
if dzs and holding>0 then sell(1,holding,marketr);
if kzs and holding<0 then sellshort(1,holding,marketr)
软件自带的公式模板中,在功能模块范例--图表交易模块范例中有完整的移动止损等范例,你可以参考学习