指标含有动态MAX(DYNAINFO(3),DYNAINFO(5))函数,可能会引起信号漂移,建议先验证一下再做为看盘工具;
X_1:=MAX(DYNAINFO(3),DYNAINFO(5));
X_2:=MIN(DYNAINFO(3),DYNAINFO(6));
X_3:=X_1-X_2;
阻力:X_2+X_3*7/8,DOTLINE,COLORYELLOW;
支撑:X_2+X_3*0.5/8,DOTLINE,COLORRED;
中:(支撑+阻力)/2,DOTLINE,COLORLIGRAY;
现价:CLOSE,COLORWHITE;
X_4:=CLOSE 支撑 AND CROSS(CLOSE,REF(CLOSE,2));
X_5:=CLOSE 阻力 AND CROSS(REF(CLOSE,2),CLOSE);
X_6:=SUM(VOL*CLOSE,0)/SUM(VOL,0);
DRAWTEXT(CURRBARSCOUNT=1,阻力,10381),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=1,支撑,10382),COLORA2A2FF;
DRAWTEXT(ISLASTBAR,(支撑+阻力)/2,10383),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=4,X_6,10384),COLORWHITE,LINETHICK2;
DRAWTEXT(CROSS(支撑,现价),(支撑-中)/5+支撑,10385),COLORYELLOW;
DRAWTEXT(CROSS(现价,阻力),阻力-(支撑-中)/5,10386),COLORMAGENTA;