看波段(DMI、KDJ、趋势线)
VAR8:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K9: SMA(VAR8,3,1),COLORffFFFF,LINETHICK3;
D9: SMA(K9,3,1),COLOR00FF00,LINETHICK3;
J9:3*K9-2*D9,COLORFFA2AF,LINETHICK3;
stickline(k9 ref(k9,1),k9,d9,1,0),COLORffFFFF,LINETHICK1 ;
N:=14;
M:=6;
TR := SMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N,1);
HD := HIGH-REF(HIGH,1);
LD := REF(LOW,1)-LOW;
DMP:= SMA(IF(HD 0 AND HD LD,HD,0),N,1);
DMM:= SMA(IF(LD 0 AND LD HD,LD,0),N,1);
多方PDI: DMP*100/TR,linethick3,color00ffff;
空方MDI: DMM*100/TR,linethick3,color0000ff;
趋势线ADX: SMA(ABS(空方MDI-多方PDI)/(空方MDI+多方PDI)*100,N,1),linethick2;
趋势线均线ADXR:(趋势线ADX+REF(趋势线ADX,M))/2,linethick2;
v0:0,colorffff00;
v10:10,colorffff00,pointdot;
v20:20,colorffff00,pointdot;
v40:40,colorffff00,pointdot;
v50:50,colorffff00;
v60:60,colorffff00,pointdot;
v80:80,colorffff00,pointdot;
v100:100,colorffff00;
DRAWICON(CROSS(ZIG(3,10) ,REF(ZIG(3 ,10),1)) ,20,1); {未来函数}
DRAWICON(CROSS(REF(ZIG(3,10),1),ZIG(3,10)) ,90,2);{未来函数}
VAR2b:=REF(LOW,1);
VAR3b:=SMA(ABS(LOW-VAR2b),3,1)/SMA(MAX(LOW-VAR2b,0),3,1)*100;
VAR4b:=EMA(IF(CLOSE*1.3,VAR3b*10,VAR3b/10),3);
VAR5b:=LLV(LOW,13);
VAR6b:=HHV(VAR4b,13);
VAR7b:=IF(MA(CLOSE,34),1,0);
VAR8b:=EMA(IF(LOW =VAR5b,(VAR4b+VAR6b*2)/2,0),3)/618*VAR7b;
VAR9b:=IF(VAR8b 100,100,VAR8b);
庄家吸筹:VAR9b,LINETHICK3,COLOR00ff00;
{其中方向线也就是PDI和MDI
PDI表示的是上升的方向线,MDI表示的是下降的方向线,当PDI在MDI的上方时表
示上升动向强于下跌动向,也就表明了市场有新的资金介入,愿意以更高的价格
做多。所以当PDI上升并穿过MDI,是买入信号。反之就是卖出信号。
要注意的是由于动向指标本身是一个趋势判断的系统,因此会受趋势是否明显的
限制,在价格波动的趋势十分明显的时候,发出的信号是十分准确的。