Q2:=(CLOSE-LLV(LOW, 18))/(HHV(HIGH, 18)-LLV(LOW, 18))*100; Q3:=SMA(Q2, 9, 1); Q4:=SMA(Q3, 3, 1); 趋势线:EMA(Q3, 3),COLORRED,LINETHICK3; DRAWTEXT(CROSS(趋势线, 长趋势) AND REF(长趋势,1)>80, REF(长趋势,3), '顶'),COLORRED,LINETHICK5; 逢低买: DRAWTEXT(REF(CROSS(趋势线,长趋势),82) AND 趋势线>1.3*长趋势,长趋势,''),LINETHICK1; 买: DRAWTEXT(REF(CROSS(长趋势,趋势线),1) AND 长趋势>1.3*趋势线,趋势线,'买'),COLORRED,LINETHICK1; VAR3:=PEAKBARS(3,15,1)<10; VAR5:=IF(VAR3=1,2,0); 顶:= IF(VAR5=2,2,0); 顶A:IF(顶>REF(顶,1),50,0),COLORGREEN; DRAWTEXT(顶A=50,45,'逃顶'),COLOR00FF00; 金叉: CROSS(长趋势,趋势线); DRAWTEXT(金叉,趋势线,'★'),COLORRED; |