飞狐DMI暴涨指标公式

[复制链接]
查看132 | 回复0 | 2021-8-21 12:41:10 | 显示全部楼层 |阅读模式

n:=4;m:=3;
TRTR := SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N);
HD := HIGH-REF(HIGH,1);
LD := REF(LOW,1)-LOW;
DMP:= SUM(IF(HD>0 AND HD>LD,HD,0),N);
DMM:= SUM(IF(LD>0 AND LD>HD,LD,0),N);
PDI:= DMP*100/TRTR;
MDI:= DMM*100/TRTR;
ADX:= MA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
ADXR:=(ADX+REF(ADX,M))/2;
预警:if(ADX>90 and PDI=0,30,0),coloryellow,linethick2;
买:if(cross(PDI,MDI) and (C >1.05*ref(C,1) or ref(C,1)>1.05*ref(C,2)) and (V>2*ref(V,1) or ref(V,1)>2*ref(V,2))and ma(V,5)>ma(V,60) ,20,0),colorred,linethick2;
买2:if(cross(PDI,MDI) and count(预警,10)>=1,10,0),colorff00ff,linethick3;

202108211200.jpg

202108211200.jpg

 

回复

使用道具 举报

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

本版积分规则