P1:=4;
P2:=2'
N:=14;
D:=42;
VAR1:=(CLOSE-LLV(LOW,P1))/(HHV(HIGH,P1)-LLV(LOW,P1))*100;
VAR2:=EMA(VAR1,P2);
VAR3:=EMA(VAR2,P1);
VAR4:=3*VAR2-2*VAR3;
VAR5:=EMA(VAR4,5);
逃顶: 100;
时: EMA(VAR5,1),NODRAW;
抄底: 0;
Y: 时, COLORSTICK;
100+(-100)*(HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N)),NODRAW;
100+(-100)*(HHV(HIGH,D)-CLOSE)/(HHV(HIGH,D)-LLV(LOW,D)),NODRAW;