NE:=IF(NAMELIKE('S') OR NAMELIKE('*S'),0.05,0.1);{适用ST股}
涨停价:=ZTPRICE(DYNAINFO(3),NE);
跌停价:=DTPRICE(DYNAINFO(3),NE);
{分时线 涨跌停变色}
IF(PERIOD=0 AND CLOSE=涨停价,CLOSE,DRAWNULL),LINETHICK2,COLORFF00B5;
IF(PERIOD=0 AND CLOSE=跌停价,CLOSE,DRAWNULL),LINETHICK2,COLOR00BB00;
{涨幅值 适用分时重播}
涨幅值:=IF(C=DYNAINFO(3),CON2STR(0,2),IF(C>DYNAINFO(3),CON2STR((C-DYNAINFO(3))/DYNAINFO(3)*100,2),CON2STR((DYNAINFO(3)-C)/DYNAINFO(3)*100,2)));
动态图标:=IF(涨停价=C OR 跌停价=C,STRCAT(CON2STR(C,2),'★ '),IF(C=REF(C,1),STRCAT(CON2STR(C,2),'◆ '),IF(C>REF(C,1),STRCAT(CON2STR(C,2),'▲ '),STRCAT(CON2STR(C,2),'▼ '))));
价格变化:=STRCAT(STRCAT(' ',动态图标),STRCAT(涨幅值,'%'));
成交额:=IF(DYNAINFO(10)>99999999,STRCAT(CON2STR(DYNAINFO(10)/100000000,2),'亿'),STRCAT(CON2STR(DYNAINFO(10)/10000,0),'万'));
DRAWTEXT_FIX(1,0.7,0.77,0,成交额),COLORF4E202;
{文字图标 动态跟随}
DRAWTEXT(ISLASTBAR,C*IF(DYNAINFO(3)>C,0.9973,1.0027),'');{扩显字符}
DRAWTEXT(ISLASTBAR AND C>DYNAINFO(3) ,C*1,价格变化),COLOR3333FF;{涨幅区}
DRAWTEXT(ISLASTBAR AND C=DYNAINFO(3) ,C*1,价格变化),COLORWHITE;{零轴区}
DRAWTEXT(ISLASTBAR AND C<DYNAINFO(3) ,C*1,价格变化),COLOR42C800;{跌幅区}
共有条评论 网友评论