克罗均线交易系统策略源码[金字塔模型]
[code]runmode:0;
input:n1(4,1,100,1);
input:n2(9,1,100,1);
input:n3(18,1,100,1);
ma1:=ma(close,n1);
ma2:=ma(close,n2);
ma3:=ma(close,n3);
if holding=0 then begin
if close>ma1 and ma1>ma2 and ma2>ma3 then
buy(1,1,limitr,close);
end
//if holding=0 then begin
// if close
// buyshort(1,1,limitr,close);
//end
if holding>0 then begin
if ma1
sell(1,holding,limitr,close);
end
//if holding<0 then begin
// if ma1>ma2 then
// sellshort(1,holding,limitr,close);
//end
资产:asset,noaxis,colormagenta;
次数:totaltrade,linethick0;
收益:(asset-30000)/30000,linethick0;
胜率:percentwin,linethick0;
出击:totaltrade/(count(date<>ref(date,1),0) 1),linethick0;
连亏:maxseqloss,linethick0;
连赢:maxseqwin,linethick0;
[/code]
页:
[1]