在线检测未来函数

通达信组合KDJ+DMI指标公式

来源:Internet,编辑:股旁网,2011-10-09

N:=14;
M:=6;
MTR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),14);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),14);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),14);
PDI:DMP*100/MTR,LINETHICK0;
MDI:DMM*100/MTR,LINETHICK0;
STICKLINE(PDI>=MDI,50,50+(PDI-MDI),0.5,0),COLORRED;
STICKLINE(PDI<MDI,50,50-(MDI-PDI),0.5,1),COLOR00FF00;
ADX:EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,6),COLORRED,LINETHICK0;
ADXR:EXPMEMA(ADX,6),COLORFF00FF,LINETHICK0;
DRAWBAND(ADX,RGB(220,0,0),ADXR,RGB(20,240,240));
STICKLINE(C>0,100,105,3,1),COLORFFFF00;
{www.gUPaNg.com 股旁网_最新股票指标公式}
STICKLINE(ADX>=ADXR,100,105,3,0),COLOR0000FF;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:SMA(RSV,3,1),LINETHICK0;
D:SMA(K,3,1),LINETHICK0;
J:3*K-2*D,COLOR00FF00,LINETHICK1;
DRAWBAND(K,RGB(220,0,220),D,RGB(180,140,140));
STICKLINE(C>0,0,-5,3,1),COLORFFFF00;
STICKLINE(K>=D,0,-5,3,0),COLORFF00FF;
DRAWTEXT(CURRBARSCOUNT=8,100,'ADX金叉ADXR'),COLORFFFF00;
DRAWTEXT(CURRBARSCOUNT=7,-7,'KDJ金叉'),COLORFFFF00;
DRAWTEXT(CURRBARSCOUNT=6,55,'PDI与MDI'),COLORFFFF00;

通达信组合KDJ+DMI指标公式

 

相关文章