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;
{ _最新股票指标公式}
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;

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。