通达信主图标注逆市涨跌次数指标公式
CC:=IF(CURRBARSCOUNT<120,"999999$C",DRAWNULL);{上证}
个涨幅:100*(C-REF(C,1))/REF(C,1),COLORYELLOW,NODRAW;
上证涨幅:100*(CC-REF(CC,1))/REF(CC,1),COLORRED,NODRAW;
IF(个涨幅>0 AND 上证涨幅<0,L*0.995,DRAWNULL),POINTDOT,LINETHICK4,COLORYELLOW;
IF(个涨幅<0 AND 上证涨幅>0,L*0.995,DRAWNULL),POINTDOT,LINETHICK4,COLOR00FF00;
逆市上涨:=IF(个涨幅>0 AND 上证涨幅<0,1,0);
逆市上涨次数:=COUNT(逆市上涨,BARSSINCE(逆市上涨)+1);
QQ:=STRCAT(STRCAT('120日逆市上涨● ',CON2STR(逆市上涨次数,0)),'次');
逆市下跌:=IF(个涨幅<0 AND 上证涨幅>0,1,0);
逆市下跌次数:=COUNT(逆市下跌,BARSSINCE(逆市下跌)+1);
XD:=STRCAT(STRCAT('★逆市下跌● ',CON2STR(逆市下跌次数,0)),'次');
MM:=STRCAT(QQ,XD);
DRAWTEXT_FIX(1,0.5,0.01,0,MM),COLORYELLOW;
DRAWTEXT_FIX(1,0,0.85,0,'暴跌检验谁是成长股,注意观查大盘长阴个股逆市上涨股'),COLORFF00FF;
赞 (0)