趋向副图指标 通达信公式(附图)

[复制链接]
查看163 | 回复0 | 2021-8-20 16:44:41 | 显示全部楼层 |阅读模式

 

N:=14;
M:=6;
TR1:=EXPMEMA(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:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);
PDI:=DMP*100/TR1;
MDI:=DMM*100/TR1;
ADX: EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
ADXR:EXPMEMA(ADX,M);
DRAWBAND(ADX,RGB(255,255,0),ADXR,RGB(0,255,0));
主升:PDI,COLOR0000FF,LINETHICK2;
主跌:MDI,COLORFFFFFF,LINETHICK2;
天:80,COLOR00FF00,POINTDOT,LINETHICK4;
地:20,COLORFF00FF,POINTDOT,LINETHICK4;
TJ:=主升>20 AND ADX>ADXR;
TJ1:=主升>20  AND ADX<ADXR;
TJ2:=主升<=20 AND ADX>ADXR;
TJ3:=主升<=20 AND ADX<ADXR;
STICKLINE(TJ,主升,20,0.1,0),COLORRED;
STICKLINE(TJ1,主升,20,0.1,0),COLORDDDD00;
STICKLINE(TJ2,主升,20,0.1,0),COLORDD00DD;
STICKLINE(TJ3,主升,20,0.1,0),COLOR00DD00;
STICKLINE(CROSS(ADX,主跌) AND 主跌<20 AND ADX>ADXR,20,40,4,0),COLOR000099;
STICKLINE(CROSS(ADX,主跌) AND 主跌<20 AND ADX>ADXR,20,40,2,0),COLOR0000BB;
STICKLINE(CROSS(ADX,主跌) AND 主跌<20 AND ADX>ADXR,20,40,1,0),COLOR0000DD;
STICKLINE(CROSS(ADX,主跌) AND 主跌<20 AND ADX>ADXR,20,40,0.5,0),COLOR0000FF;
DRAWICON(CROSS(ADX,ADXR) AND 主跌<20,20,23);

14Q24L11260-44P7.jpg

14Q24L11260-44P7.jpg

回复

使用道具 举报

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

本版积分规则