input:j1(-50,-50,120);
n:=9;m1:=3;m2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,M1,1);
D:=SMA(K,M2,1);
J:=3*K-2*D;
{-----线值------------}
k1:1/3*rsv+ref(k,1)/3*2;
d1:1/3*k+ref(d,1)/3*2;
Jj:3*K1-2*D1;
{-----显示-------------}
j11:=j;j昨:=ref(j,1);jx:=if(j1=-50,j11,if(j1=-49,j昨,j1));
xxx:((9/7*jx-2*ref(k,1)+12/7*ref(d,1))/100)*(HHV(HIGH,9)-LLV(LOW,9))+LLV(LOW,9),colorred,linethick;
IF j1=-50 THEN BEGIN
DRAWTEXTEX(sysparam(3)=BARPOS,0,10,10,'设J='+NUMTOSTR(jx[SYSPARAM(1)],2)+' 所演即时股价: '+NUMTOSTR(xxx[SYSPARAM(1)] ,2)),colorred;
end;
IF j1=-49 THEN BEGIN
DRAWTEXTEX(sysparam(3)=BARPOS,0,10,10,'设J='+NUMTOSTR(jx[SYSPARAM(1)],2)+' J线拐头股价: '+NUMTOSTR(xxx[SYSPARAM(1)] ,2)),coloryellow;
end;
IF j1>-49 THEN BEGIN
DRAWTEXTEX(sysparam(3)=BARPOS,0,10,10,'设J='+NUMTOSTR(jx[SYSPARAM(1)],2)+' J线达标临界股价: '+NUMTOSTR(xxx[SYSPARAM(1)] ,2)),color00ff00;
end;