当股价与60日均线乖离率达到10%以上 在K线最高价上方画一虚线出来 虚线后方显示乖离率达到10%
公式模块:
当股价与60日均线乖离率达到10%以上,在K线最高价上方画一虚线出来,虚线后方显示乖离率达到10%。
M60:MA(C,60);
GL:=(C-M60)/M60*100;
STICKLINE(CROSS(GL =10,0.5),H,L,0,0),COLORYELLOW;
STICKLINE(CROSS(GL =10,0.5),C,O,1.5,0),COLORYELLOW;
DRAWTEXT(CROSS(GL =10,0.5),H*1.02,'上乖离+10'),COLORYELLOW;
STICKLINE(CROSS(GL =-10,0.5),H,L,0,0),COLORGREEN;
STICKLINE(CROSS(GL =-10,0.5),C,O,1.5,0),COLORGREEN;
DRAWTEXT(CROSS(GL =-10,0.5),H*1.02,'下乖离-10'),COLORGREEN;