WRMDI,副图源码
2014-9-15 14:55:15点击:
此指标为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;