runmode:0;
input:volatility(20,5,100,5);
variable:myasset=30000;
entertime:=time>=092500 and time<=145500; //这一句为什么编译有错误???
exittime:=time>=150000;
dist:=barslast(date<>ref(date,1));
oo:=ref(open,dist);
highest:=oo+volatility*mindiff;
lowest:=oo-volatility*mindiff;
buycond:=entertime and high>=highest;
buyprice:=max(open,highest);
buyshortcond:=entertime and low<=lowest;
buyshortprice:=min(open,lowest);
if holding=0 and buycond then begin
buy(1,1,limitr,buyprice);
end
if holding=0 and buyshortcond then begin
buyshort(1,1,limitr,buyshortprice);
end
if holding>0 and exittime then begin
sell(1,holding,limitr,close);
end
if holding<0 and exittime then begin
sellshort(1,holding,limitr,close);
end
if exittime then
myasset:=asset;
资产:myasset,noaxis,colormagenta;
次数:totaltrade,linethick0;
收益:(myasset-30000)/30000,linethick0;
胜率:percentwin,linethick0;
出击:totaltrade/(count(date<>ref(date,1),0)+1),linethick0;
连亏:maxseqloss,linethick0;
连赢:maxseqwin,linethick0;
字体问题。要用英文半角输入
把 < 、> 重新输入即可
兄弟:
这些模型的时间周期怎么设置啊?用多少分钟。