variable:positioncount=0;
atr:=ma(tr,20);
day20high:=ref(hhv(high,20),1);
day20low:=ref(llv(low,20),1);
day55high:=ref(hhv(high,55),1);
day55low:=ref(llv(low,55),1);
longcond1:=high>day20high;
shortcond1:low<day20low;
if longcond1 and positioncount=0 then
begin
ss:=INTPART(asset*0.02/atr/MULTIPLIER);
buy(1,ss,market);
positioncount:=positioncount+1;
end
if high>enterprice+0.5*atr and positioncount<>0 and positioncount<4 then
begin
ss:=INTPART(asset*0.02/atr/MULTIPLIER);
buy(1,ss,market);
positioncount:=positioncount+1;
end
if low<enterprice-2*atr then
begin
sell(1,100%,market);
positioncount:=0;
end
asset100:asset,noaxis;
持仓:holding,linethick0;
依照海龟规则 简单写了个
不知道有啥问题 为什么收益那么差 第一次写 有哪里写的不对呢?