Z:=MA(C,120);
VAR3:=(MA(H,5)-Z)/Z;
VAR4:=MA((CLOSE-LLV(LOW,10))/(HHV(HIGH,10)-LLV(LOW,10))*100,3);
D1:DRAWTEXT(crOSS(95,VAR4) AND VAR3>0.3,1.01*HIGH ,'★S'),COLORRED;
D2:DRAWTEXT( CROSS(93,VAR4) AND HHV(H,30)/LLV(L,30)>1.1 AND REF(Z,1)/Z>0.997 ,1.01*HIGH ,'★S'),COLORGREEN;
D3:DRAWTEXT(CLOSE<Z AND Z<REF(Z,1) AND REF(VAR4,1)>90 AND VAR4<REF(VAR4,1) AND REF(VAR4,1)>REF(VAR4,2) ,1.01*HIGH,'★S'),COLORBLUE;