N:=9;
随机值:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
KSMA:=SMA(随机值,3,1);
DSMA:=SMA(KSMA,3,1);
M1:=N-1;
F:=HHV(HIGH,M1)-LLV(LOW,M1);
K:=KSMA/3*2+(CLOSE-LLV(LOW,M1))/F*100/3;
D:=DSMA/3*2+K/3;
J:=3*K-2*D;
X1:=(J*9+DSMA*12-KSMA*14)*F/700+LLV(LOW,M1);
现价:=X1;
低价:=(F*20/100+LLV(LOW,M1));
买2:=crOSS(现价,低价) AND kdj.J<30;
买1:买2;