【通达信源码分享】大盘情绪结合DMI公式(副图 源码 测试图)
通达信免费指标
09-05
阅读:1955
评论:0
公式解释:
判断强势的标准是:DMI指标中的PDI大于其他三条线
{DMI大盘情绪}
{参数N=15,M=5}
N:=15;
M:=5;
DRAWGBK(C>0, RGB(50,60,250),RGB(17,21,89),0,'11',0);
沪A涨家数:="999999$ADVANCE",COLORRED,NODRAW;
深A涨家数:="399107$ADVANCE",COLORRED,NODRAW;
创业板涨家数:="399006$ADVANCE",COLORRED,NODRAW;
中小板涨家数:="399005$ADVANCE",COLORRED,NODRAW;
沪A跌家数:="999999$DECLINE",COLORGREEN,NODRAW;
深A跌家数:="399107$DECLINE",COLORGREEN,NODRAW;
创业板跌家数:="399006$DECLINE",COLORRED,NODRAW;
中小板跌家数:="399005$DECLINE",COLORRED,NODRAW;
上涨总家数:沪A涨家数+深A涨家数+创业板涨家数+中小板涨家数,COLORRED,NODRAW;
下跌总家数:沪A跌家数+深A跌家数+创业板跌家数+中小板跌家数,COLORGREEN,NODRAW;
大盘情绪:上涨总家数*100/(上涨总家数+下跌总家数),LINETHICK1;
涨停:"880006$H" NODRAW COLOR0000FF;
跌停:"880006$O" NODRAW COLORGREEN;
沸:90,COLORRED;
温:50,COLORWHITE;
冰点看连板:10,COLORGREEN;
MTR:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=SUM(IF(HD>0&&HD>LD,HD,0),N);
DMM:=SUM(IF(LD>0&&LD>HD,LD,0),N);
PDI: DMP*100/MTR,LINETHICK2,COLORGREEN;
MDI: DMM*100/MTR,DOTLINE,COLORYELLOW;
ADX: MA(ABS(MDI-PDI)/(MDI+PDI)*100,M),DOTLINE,COLORYELLOW;
ADXR:(ADX+REF(ADX,M))/2,DOTLINE,COLORYELLOW;
版权声明
本文版权归掌上指标所有。
未经许可,不得转载,转载请注明出处!