1.每涨10点平2手
VARIABLE:temp=0;
if close-ENTERPRICE>=10 and temp=0 then begin sell(); temp:=close; end
if temp!=0 and close-temp>=10 then begin sell(); temp:=close; end
2.这里控制了下平仓次序,如果你觉得低于5日和10日任意一个先触发都平,我再改。
VARIABLE:temp=0;
if close<ma(close,5)and temp=0 then begin sell(1,holding/2,MARKET);temp:=1;end
if temp and close<ma(close,10) then begin sell(1,holding/2,MARKET); end