九毛八公式指标
公式模块:
TH:=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/TR,COLORFFFFFF,LINETHICK2;
mdi: DMM*100/TR,COLOR00FFFF,LINETHICK2;
ADX: EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M),LINETHICK1;
ADXR:EXPMEMA(ADX,M),COLOR00FF00,LINETHICK1;
底:1.5,COLOR0BFFFF,POINTDOT,COLOR00FF00;
好:50,COLOR80FFFF,POINTDOT;
高:95,COLOR0BFFFF,POINTDOT;
DRAWICON(crOSS(PDI,MDI),MDI,1);
DRAWICON(CROSS(1.5,MDI),MDI,15);
DRAWICON(CROSS(MDI,PDI),PDI,2);
DRAWICON(CROSS(ADX,95),95,11);
T1:=CROSS("dmi.PDI"(3,2),"DMI.MDI"(3,2)) AND CROSS("DMI.ADX"(3,2),"DMI.ADXR"(3,2))
AND
CROSS("DMI.PDI"(5,3),"DMI.MDI"(5,3)) AND CROSS("DMI.ADX"(5,3),"DMI.ADXR"(5,3));
STICKLINE(T1,0,80,1,1),COLOR0000FF;
p:=14;m:=6;
TR1 := SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),P);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:= SUM(IF(HD>0 AND HD>LD,HD,0),P);
DMM:= SUM(IF(LD>0 AND LD>HD,LD,0),P);
PDI: DMP*100/TR1,COLORFFFFFF,LINETHICK2;
MDI: DMM*100/TR1,COLOR00FFFF,LINETHICK2;
ADX: MA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
ADXR:(ADX+REF(ADX,M))/2;
底:1.5,COLOR0BFFFF,POINTDOT,COLOR00FF00;
好:50,COLOR80FFFF,POINTDOT;
高:95,COLOR0BFFFF,POINTDOT;
DRAWICON(CROSS(PDI,MDI),MDI,1);
DRAWICON(CROSS(1.5,MDI),MDI,15);
DRAWICON(CROSS(MDI,PDI),PDI,2);
DRAWICON(CROSS(ADX,95),95,11);
T1:=CROSS("DMI.PDI"(3,2),"DMI.MDI"(3,2)) AND CROSS("DMI.ADX"(3,2),"DMI.ADXR"(3,2))
AND
CROSS("DMI.PDI"(5,3),"DMI.MDI"(5,3)) AND CROSS("DMI.ADX"(5,3),"DMI.ADXR"(5,3));
STICKLINE(T1,0,80,1,1),COLOR0000FF