VAR1:=HHV(HIGH,18);
VAR2:=LLV(LOW,18);
DIF:EMA((CLOSE-VAR2)/(VAR1-VAR2)*100,18),COLORGREEN;
P1:=EMA((CLOSE-VAR2)/(VAR1-VAR2)*100,5);
DEA:P1,COLORRED,LINETHICK2;
买入:crOSS(DEA,DIF) AND DIF<22,COLORYELLOW,LINETHICK0;
DRAWTEXT(CROSS(DEA,DIF) AND 买入,20,'买入'),COLORRED;