WRMDI副图公式源码,贴图说明

[复制链接]
查看50 | 回复0 | 2022-7-24 06:37:24 | 显示全部楼层 |阅读模式

WRMDI副图公式源码,贴图说明

此指标为WR+MDI指标的组合,本人对WR进行了较大的变动,MDI对参数进行调整。把二个指标组合一起后就变成了一个指标,三条加粗线是主要运用线,三条数值线为判断线。具体用法从图一看便知。对于判别顶底,主升和盘整会有所帮助。源码为通达信

STICKLINE(C>0,20,20,1,0),COLORRED;
STICKLINE(C>0,50,50,10,0),COLOR0099FF;
STICKLINE(C>0,80,80,1,0),COLOR00bb00;

WR1:=100*(HHV(H,21)-C)/(HHV(H,21)-LLV(L,21));
WR2:=100*(HHV(H,42)-C)/(HHV(H,42)-LLV(L,42));
WR3:=100*(HHV(H,63)-C)/(HHV(H,63)-LLV(L,63));
WR4:=100*(HHV(H,84)-C)/(HHV(H,84)-LLV(L,84));
WR5:=100*(HHV(H,105)-C)/(HHV(H,105)-LLV(L,105));
WR6:=100*(HHV(H,126)-C)/(HHV(H,126)-LLV(L,126));
WR:(WR1+WR2+WR3+WR4+WR5+WR6)/6,COLORMAGENTA,LINETHICK2;
swr:sMA(wr,21,1),COLORAAAA00,DOTLINE;
KC:=MAX(MAX(ABS(H-L),ABS(H-REF(C,1))),ABS(REF(C,1)-L));
MTR:=EMA(KC+SLOPE(KC,21),21);
HD :=H-REF(H,1);
LD :=REF(L,1)-L;
DMP:=EMA(IF(HD>0&&HD>LD,HD,0)+SLOPE(IF(HD>0&&HD>LD,HD,0),21),21);
DMM:=EMA(IF(LD>0&&LD>HD,LD,0)+SLOPE(IF(LD>0&&LD>HD,LD,0),21),21);
PDI:DMP*100/MTR,COLORRED,LINETHICK2;
MDI:DMM*100/MTR,COLOR00CCCC,LINETHICK2;
MG:=ABS(PDI-MDI)/(MDI+PDI)*100;
ADX:EMA(MG+SLOPE(MG,14),14),COLORFFCCAA,DOTLINE;

635155469.png

635155469.png

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则