RAVI>0.5%
ravi是上面公式里面算出来的,还是要除以100?
ravi:abs((ma(c,7)-ma(c,65))/ma(c,65));
if ravi>0.005 and all(c>ma(c,65),3) then buy(holding=0,1,marketr);
if RAVI>0.005 and all(c<ma(c,65),3) then buyshort(holding=0,1,marketr);
if openprofit<-1000 and enterbars>0 then BEGIN
sell(1,0,marketr);
sellshort(1,0,marketr);
end
if h=hhv(h,14) and holding<0 then sellshort(1,0,MARKETr);
if l=llv(l,14) and holding>0 then sell(1,0,marketr);
variabe:bj=0;
ravi:abs((ma(c,7)-ma(c,65))/ma(c,65));
if ravi>0.005 and all(c>ma(c,65),3) and bj=0 then buy(holding=0,1,marketr);
if RAVI>0.005 and all(c<ma(c,65),3) and bj=0 then buyshort(holding=0,1,marketr);
if openprofit<-1000 and enterbars>0 and holding<>0 then BEGIN
sell(1,0,marketr);
sellshort(1,0,marketr);
bj:=1;
end
if h=hhv(h,14) and holding<0 then begin
sellshort(1,0,MARKETr);
bj:=1;
end
if l=llv(l,14) and holding>0 then begin
sell(1,0,marketr);
bj:=1;
end
if barslast(holding=0 and ref(holding<>0,1)) then bj:=0;