N:=9;M:=6;
MTR:=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/MTR;
下降(mdi): DMM*100/MTR;
抄底:=crOSS(上升(PDI),下降(MDI));
DRAWTEXT(抄底,上升(PDI),30),COLORYELLOW;
DRAWICON(抄底,上升(PDI)*0.68,5);
趋势(ADX): EXPMEMA(ABS(下降(MDI)-上升(PDI))/(下降(MDI)+上升(PDI))*100,M);
ADXR:EXPMEMA(趋势(ADX),M),COLORRED;
{ _通达信股票指标公式}
底背离:=REF(CLOSE,1)>CLOSE AND ADXR>=REF(ADXR,1);
不底背离:=REF(CLOSE,1)<CLOSE AND ADXR<=REF(ADXR,1);
STICKLINE(底背离,0,3,6,0),COLORRED,LINETHICK2;
{DRAWBAND(底背离,RGB(0,224,224),不底背离,DRAWNULL);}
IF(ADXR<=REF(ADXR,1),ADXR,DRAWNULL),LINETHICK2,COLORGREEN;
{小新底部确认: DMM*100/TR;}
50,POINTDOT,LINETHICK2;
20,POINTDOT,LINETHICK2;
10,POINTDOT,LINETHICK2;

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