KAIDUO:=longcond and close>ma3;
KAIKONG:=shortcond AND BEIH and close<ma3;
PINGDUO:=shortcond AND BEIH OR close<ma3;
PINGKONG:=longcond AND BEIL OR close>ma3;
if holding>0 then begin //平多
if PINGDUO then
sell(1,holding,limitr,open);
end
if holding=0 then begin
if PINGDUO then
buyshort(1,10,limitr,open);
end
if time=145700 then
sell(1,holding,limitr,open);
if holding<0 then begin //平空
if PINGKONG then
sellshort(1,holding,limitr,open);
end
if holding=0 then begin
if PINGKONG then
buy(1,10,limitr,open);
end
if time=145700 then
sellshort(1,holding,limitr,open);
收益:asset,noaxis,colorred;
次数:totaltrade,linethick0;
胜率:percentwin,linethick0;
连亏:maxseqloss,linethick0;
连赢:maxseqwin,linethick0;
俺自己改了,测试都没成交啊,最好改成现价成交!谢谢!
[此贴子已经被作者于2011-4-18 16:57:23编辑过]
如果你还没理解后台的编写方法
最简单的方法是在相应的指令前面,紧跟着 后台指令,两种指令要紧密连在一起哦
比如:
if time=145700 then
sellshort(1,holding,limitr,open);
改为
if time=145700 then begin
tsellshort(1,holding,lmt,open);
sellshort(1,holding,limitr,open);
end