P1:=(5); P2:=(4);
VAR1:=LLV(LOW,P1);
VAR2:=HHV(HIGH,P1);
短: EMA((CLOSE-VAR1)/(VAR2-VAR1)*100,P2),COLORFF00FF,COLORRED;
线: EMA(0.667*REF(短,1)+0.333*短,2),COLORCYAN;
中: EMA((短+线)/2,13);
拐点:REF(线,1),COLORGREEN,LINETHICK0;
次日买入价:IF(CLOSE>OPEN,OPEN+(CLOSE-OPEN)/2+0.05,0),COLORRED,LINETHICK0;
次日卖出价:IF(OPEN>CLOSE AND 线>短,CLOSE+(OPEN-CLOSE)/2-0.1,0),COLORGREEN,LINETHICK0;
买入参考:=CROSS(短,线);
卖出参考:=CROSS(线,短);
DRAWICON(买入参考 AND 线<40,线,1);
DRAWICON(卖出参考 AND 线>60,线,2);
顶1:80;
底1:20;
顶2:60;
底2:40;