大盘情绪结合DMI公式通达信公式 副图 源码附图
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;
{股票指标网 整理};
来函数检测结果如下:
该公式没有未来函数
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
N赋值:15
M赋值:5
填充背景(C>0, RGB(50,60,250),RGB(17,21,89),0,'11',0)
沪A涨家数赋值:"999999$ADVANCE",画红色,NODRAW
深A涨家数赋值:"399107$ADVANCE",画红色,NODRAW
创业板涨家数赋值:"399006$ADVANCE",画红色,NODRAW
中小板涨家数赋值:"399005$ADVANCE",画红色,NODRAW
沪A跌家数赋值:"999999$DECLINE",COLORGREEN,NODRAW
深A跌家数赋值:"399107$DECLINE",COLORGREEN,NODRAW
创业板跌家数赋值:"399006$DECLINE",画红色,NODRAW
中小板跌家数赋值:"399005$DECLINE",画红色,NODRAW
输出上涨总家数:沪A涨家数+深A涨家数+创业板涨家数+中小板涨家数,画红色,NODRAW
输出下跌总家数:沪A跌家数+深A跌家数+创业板跌家数+中小板跌家数,COLORGREEN,NODRAW
输出大盘情绪:上涨总家数*100/(上涨总家数+下跌总家数),LINETHICK1
输出涨停:"880006$H" NODRAW COLOR0000FF
输出跌停:"880006$O" NODRAW COLORGREEN
输出沸:90,画红色
输出温:50,画白色
输出冰点看连板:10,COLORGREEN
MTR:=SUM(MAX(MAX(最高价-最低价,最高价-1日前的收盘价的绝对值),ABS(1日前的收盘价-最低价)),N)
HD :=最高价-1日前的最高价
LD :=1日前的最低价-最低价
如果HD>0&&HD>LD返回HD否则返回0
如果LD>0&&LD>HD返回LD否则返回0
输出PDI: DMP*100/MTR,LINETHICK2,COLORGREEN
MDI: DMM*100/MTR,DOTLINE,画黄色
输出ADX: MA(MDI-PDI的绝对值/(MDI+PDI)*100,M),DOTLINE,画黄色
ADXR:(ADX+M日前的ADX)/2,DOTLINE,画黄色
{股票指标网 整理}