{突破上轨,在该K线的最高价画红点、向右画横线}
TP:=CROSS(C,HH) AND EVERY(REF(C,1) REF(HH,1),3);{突破上轨}
TC:=BARSLAST(TP);
STICKLINE(TC 0,REF(H,TC),REF(H,TC),8,-1),COLORLIRED;{突破上轨,在该K线的最高价向右画横线};
●:IF(TP,H,DRAWNULL),POINTDOT,COLORRED,LINETHICK4; {突破上轨,在该K线的最高价画红点};
TP1:=CROSS(LL,C) AND EVERY(REF(C,1) REF(LL,1),3);{突破上轨}
TC1:=BARSLAST(TP1);
STICKLINE(TC1 0,REF(L,TC1),REF(L,TC1),8,-1),COLORGREEN;{跌破下轨,在该K线的最低价向右画横线};
●1:IF(TP1,L,DRAWNULL),POINTDOT,COLORGREEN,LINETHICK4; {跌破下轨,在该K线的最低价画红点};