精典之极--DMI

2011-02-20 11:20:00来源:本站整理浏览:178

N:=14;
M:=6;
N1:=21;
LC:=REF(CLOSE,1);
RSI1:SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100,COLORFF0000;
IF(RSI1>53,RSI1,DRAWNULL),COLORRED,LINETHICK1;
DRAWICON(CROSS(RSI1,53),53-1,11);
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,COLORFFFFFF;
MDI: DMM*100/MTR,COLOR00FFFF;
ADX: EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M),COLOR0000FF,LINETHICK2;
ADXR:EXPMEMA(ADX,M),COLOR00FF00,LINETHICK2;
{一,MDI必须在下方,PDI在下方无效,二、PDI趋势向上。三、必须在PDI及MDI中间金叉 }
T1:=CROSS(ADX,ADXR) AND PDI>MDI AND PDI>REF(PDI,1)
AND  BETWEEN(ADXR,MDI,PDI) AND ADX>REF(ADX,1) AND ADXR>REF(ADXR,1);
DRAWICON(T1,ADXR,1);
{ADX  ADXI同时上穿MDI }
T2:=CROSS(ADX,MDI) AND CROSS(ADXR,MDI) AND PDI>MDI;
DRAWICON(T2,MDI,17);
 

股票公式栏目导航

精品指标推荐

最新热门

本类随机推荐

相关公式