动向速度比率
DMZ:=IFELSE((HIGH+LOW)<=(REF(HIGH,1)+REF(LOW,1)),0,MAX(ABS(HIGH-REF(HIGH,1)),ABS(LOW-REF(LOW,1))));
公式函数
DMZ:=IF((H+L)<=(REF(H,1)+REF(L,1)),0,MAX(ABS(H-REF(H,1)),ABS(L-REF(L,1))));
DMF:=IF((H+L)>=(REF(H,1)+REF(L,1)),0,MAX(ABS(H-REF(H,1)),ABS(L-REF(L,1))));
ADMZ:=MA(DMZ,10);
ADMF:=MA(DMF,10);
SRDM:IF(ADMZ>ADMF,(ADMZ-ADMF)/ADMZ,IF(ADMZ=ADMF,0,(ADMZ-ADMF)/ADMF));
ASRDM:SMA(SRDM,N,1);
具体解释
//如果高点加低点的价格小于等于昨天的高点加低点的价格,则返回0,否则返回 当根k线的高点与上根k线的高点的差值的绝对值与当根k线的低点与上根k线的低点的绝对值中较大者;
DMF:=IFELSE((HIGH+LOW)>=(REF(HIGH,1)+REF(LOW,1)),0,MAX(ABS(HIGH-REF(HIGH,1)),ABS(LOW-REF(LOW,1))));
//如果当根k线的高点加低点的价格大于等于昨天的高点加低点的价格,则返回0,否则返回 当根k线的高点与上根k线的高点的差值的绝对值与当根k线的低点与上根k线的低点的绝对值中较大者;
ADMZ:=MA(DMZ,10);//DMZ值的10日简单移动平均;
ADMF:=MA(DMF,10);//DMF值的10日简单移动平均;
SRDM:IFELSE(ADMZ>ADMF,(ADMZ-ADMF)/ADMZ,IFELSE(ADMZ=ADMF,0,(ADMZ-ADMF)/ADMF));//如果ADMZ>ADMF,则返回(ADMZ-ADMF)/ADMZ,否则当ADMZ=ADMF时返回0,小于时返回(ADMZ-ADMF)/ADMF;
ASRDM:SMA(SRDM,N,1);//SRDM值的N日以1为权重的移动平均;
CROSS(SRDM,ASRDM),BPK;//SRDM上穿ASRDM,买平开;
CROSS(ASRDM,SRDM),SPK;//ASRDM下穿SRDM,卖平开;
AUTOFILTER;