AAA:=(3*C+H+L+O)/6;
VAR1:(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)+4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36,LINETHICK2,COLORRED;
IF((VAR1 = REF(VAR1,1)),VAR1,DRAWNULL),COLORGREEN,LINETHICK3;
IF((VAR1 = REF(VAR1,1)),VAR1,DRAWNULL),COLORRED,LINETHICK3;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,2,1);
D:=SMA(K,2,1);
J:=3*K-2*D;
买入:=CROSS(J,0)AND(H =支撑线);
DRAWICON(买入,LOW*0.95,25);