[PEL] 复制代码 ma400:ma(c,400);
DIFF : EMA(CLOSE,12) - EMA(CLOSE,26),NOAXIS;
DEA : EMA(DIFF,9);
MACD1 : 2*(DIFF-DEA);
if c> ma400 and cross(DIFF,DEA) AND DIFF >0 then
begin
sellshort(1,holding,marketr);
buy(holding=0,40%,marketr);
end
if c< ma400 and cross(DEA,DIFF) AND DIFF <0 then
begin
sell(1,holding,marketr);
buyshort(holding=0,40%,marketr);
END
if (close < enterprice-30*mindiff ) and holding>0 then sell(1,holding,marketr);
if ( close > enterprice+30*mindiff ) and holding<0 then sellshort(1,holding,marketr);
|