RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,P1,1);
D:=SMA(K,P2,1);
J:=3*K-2*D;
zhenfu:=(h-l)/ref(c,1);
max5_vol:=hhvbars(vol,5);
min5_vol:=llvbars(vol,5);
min5_zhenfu:=llvbars(zhenfu,5);
if d<30 and d>ref(d,1) and ref(d,1)>ref(d,2) and h>ref(h,max5_vol) then buy();
if h>ref(h,min5_zhenfu) then buy();
if h>ref(h,min5_vol) then buy();
//止损
if c<enterprice*0.8 then sell();
if l<ref(l,1) then sell();
//移动止盈
if (HHV(H,ENTERBARS)-CLOSE)/AVGENTERPRICE>=0.3 and hhv(h,enterbars)>enterprice*1.1 then sell();