VAR1:=(CLOSE-LLV(LOW, 18))/(HHV(HIGH, 18)-LLV(LOW, 18))*100;
VAR2:=SMA(VAR1, 9, 1);
VAR3:=SMA(VAR2, 3, 1);
短期趋势:3*VAR2-2*VAR3,COLORWHITE,LINETHICK3;
中期趋势:EMA(VAR2, 3),COLORRED,LINETHICK3;
DRAWTEXT(CROSS(中期趋势, 短期趋势) AND REF(短期趋势,1)>80, REF(短期趋势,3), '▼逢高派发'), COLOR00FF00,LINETHICK5;
逢低关注: DRAWTEXT(REF(CROSS(中期趋势,短期趋势),82) AND 中期趋势>1.3*短期趋势,短期趋势,'逢低关注'), COLOR00FFFF, LINETHICK1;
抄底:DRAWTEXT(REF(CROSS(短期趋势,中期趋势),1) AND 短期趋势>1.3*中期趋势,中期趋势,'抄底'),COLORBLUE,LINETHICK1;
VAR4:=PEAKBARS(3,5,1)<10;
VAR5:=IF(VAR4=1,2,0);
顶:= IF(VAR5=2,2,0);
顶A:IF(顶>REF(顶,1),50,0),COLORGREEN, LINETHICK2;
DRAWTEXT(顶A=50,45,'小 心'),COLOR00FF00;