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<ma1 and ma1<ma2 and ma2<ma3 then
buyshort(1,1,limitr,close);
end
if holding>0 then begin
if ma1<ma2 then
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-40000)/40000,linethick0;
胜率:percentwin,linethick0;
出击:totaltrade/(count(date<>ref(date,1),0)+1),linethick0;
连亏:maxseqloss,linethick0;
连赢:maxseqwin,linethick0;
原因一样啊,大于号 和 小于号 的字体问题
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<ma1 and ma1<ma2 and ma2<ma3 then
// buyshort(1,1,limitr,close);
//end
if holding>0 then begin
if ma1<ma2 then
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;
~~~~~~~