1、ddx指标的基本公式
QJJ:=VOL / ((H - L) * 2 - ABS(C - O));
XVL:=IF(C > O,QJJ * (H - L),IF(C < O,QJJ * (H - O + (C - L)),VOL / 2)) + IF(C > O,0 - QJJ * (H - C + (O - L)),IF(C < O,0 - QJJ * (H - L),0 - VOL / 2));
HSL:=XVL / 20 / 1.15;
STICKLINE(HSL * 0.4 >= 0,HSL * 0.4 * 1.5,0,2.3,0)COLORYELLOW;
STICKLINE(HSL * 0.4 < 0,HSL * 0.4 * 1.5,0,2.3,0)COLORGREEN;
仅仅是简单的几行代码,显示的是一个量柱的指标走势,同时也表现了资金的流动方向,希望投资者能够仔细的分析图中的变化,并在市场中不断的获利。
2、ddx买盘卖盘的分析
WJ:=(H+L+C)/3;
V1:=IF(H=L,1,H-MAX(O,C));
V2:=IF(H=L,1,MAX(C,O)-WJ);
V3:=IF(H=L,1,MIN(O,C)-L);
V4:=IF(H=L,1,WJ-MIN(C,O));
V5:=VOL/IF(H=L,4,H-L);
V6:=(V1*V5);
V7:=(V2*V5);
V8:=(V3*V5);
V9:=(V4*V5);
买盘:=(V9+V8);
卖盘:=(V6+V7);
买卖差:=买盘-卖盘;
DDX:=买卖差;
DX:=MA(买卖差,5)*20;
N:=5;
M:=13;
N日内净流入:=SUM(DDX,N)*3;
流入:=IF(N日内净流入>REF(N日内净流入,1),N日内净流入,DRAWNULL);
DRAWBAND(N日内净流入,RGB(100,100,100),0,RGB(0,100,150));
{波段转向}{5天3%}
DLX1:=SMA(DX,3,1),LINETHICK,COLORWHITE;
RSV:=((C-LLV(L,6))/(HHV(H,6)-LLV(L,6)))*100;
K:=POW(SMA(RSV,2,1),5)/POW(10,8);
D:=POW(SMA(RSV,2,1),5)/POW(10,10);
J:=(K+ D)/2;
花开短买:IF(CROSS(J,1),1,0) AND DLX1>REF(DLX1,1),COLORYELLOW;
IF(花开短买,150000,DRAWNULL),CROSSDOT,LINETHICK6,COLORFF33FF;
IF(花开短买,150000,DRAWNULL),POINTDOT,LINETHICK4,COLOR00CCFF;
IF(MACD>=0 AND REF(MACD,1)<0,1,DRAWNULL),CROSSDOT,LINETHICK6,COLORFF33FF;
IF(MACD>=0 AND REF(MACD,1)<0,1,DRAWNULL),POINTDOT,LINETHICK4,COLOR00CCFF;
RSI1:=N日内净流入;
AA:=REF(RSI1,N)=HHV(RSI1,2*N+1);
BB:=BACKSET(AA,N+1);
CC:=FILTER(BB,N) AND RSI1=HHV(RSI1,N+1);
A1:=BARSLAST(REF(CC,1));
顶背离:REF(CLOSE,A1+1)RSI1 AND CC,COLORRED;
DRAWLINE(CC,RSI1,FILTER(顶背离>0,5),RSI1,0),COLORRED;
AA2:=REF(RSI1,N)=LLV(RSI1,2*N+1);
BB2:=BACKSET(AA2,N+1);
CC2:=FILTER(BB2,N) AND RSI1=LLV(RSI1,N+1);
A2:=BARSLAST(REF(CC2,1));
底背离:REF(CLOSE,A2+1)>CLOSE AND REF(RSI1,A2+1)
DRAWLINE(CC2,RSI1,FILTER(底背离>0,5),RSI1,0),COLORCYAN;
STICKLINE(DDX<0,0,DDX,4,0),COLORFF6600;
STICKLINE(DDX<0,0,DDX,3,0),COLORFF9900;
STICKLINE(DDX<0,0,DDX,1.5,0),COLORFFCC00;
STICKLINE(DDX<0,0,DDX,0,0),COLOR66CCFF;
STICKLINE(DDX>0,0,DDX,4,0),COLOR000099;
STICKLINE(DDX>0,0,DDX,3,0),COLOR0000CC;
STICKLINE(DDX>0,0,DDX,1.5,0),COLOR0000FF;
STICKLINE(DDX>0,0,DDX,0,0),COLORCC66FF;
DDX1:SMA(DX,3,1),COLORFFFFFF;
DDX2:SMA(DDX1,3,1),COLOR00FFFF;
DDX3:(5*DDX2+4*REF(DDX2,1)+3*REF(DDX2,2)+2*REF(DDX2,3)+REF(DDX2,4))/15;
预警:DDX>0 AND MA(V,5)>MA(MA(V,5),5) AND CROSS(DDX1,DDX2),LINETHICK;
天:=COUNT(DDX>0,5),COLORRED;
DRAWTEXT(预警,DDX*1.06,'★'),LINETHICK3,COLOR00FFFF;
而在其买卖盘的显示中,能够发现的是该指标结合其他的rsi指标进行的顶底背离的个股走势分析,以及在买卖盘的流动方向。
3、ddx买卖提示
DDX:(LARGEINTRDVOL-LARGEOUTTRDVOL)*10000/FINANCE(7),NODRAW;
DX:=MA(DDX,3)*100;
DDX1:SMA(DX,3,1),COLORFFFFFF;
DDX2:SMA(DDX1,2,1),COLOR00FFFF;
DDX3:EMA(DDX2,3),COLORFF00FF;
STICKLINE(DDX>0,0,DDX*20,2,0),COLORRED;
STICKLINE(DDX<0,0,DDX*20,2,0),COLORCYAN;
拉升力:=(CLOSE-LLV(LOW,28))/(HHV(HIGH,30)-LLV(LOW,36))*0.6*CLOSE;
拉升力A:=SMA(拉升力,6.3,1);
拉升力B:=3*拉升力A-2.1*SMA(拉升力A,3,1);
空方:=3*SMA(拉升力A,3,1)-1* 拉升力A;
做空:IF(空方>拉升力B,拉升力B,空方),LINETHICK2,COLOR00FF00;
多头:IF(做空>=REF(做空,1) ,做空,DRAWNULL),COLORRED,LINETHICK2;
DRAWICON(做空>=REF(做空,1) AND REF(做空,1)
空头:IF(做空
{DRAWICON(做空<=REF(做空,1) AND REF(做空,1)>REF(做空,2),做空,19);}
此时,指标线中的走势仅仅是一条线的形态,能够清楚的显示个股是应该做空还是做多,并结合拉升程度进行了基本的分析,帮助投资者在实战中识别买卖点的基础位置。
4、ddx选股公式
AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN))/5000;
买量:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE
卖量:=IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE
进出量:=买量+卖量;
今DDX:进出量,COLORRED,NODRAW,LINETHICK1;
昨DDX:REF(今DDX,1),COLORGREEN,NODRAW,LINETHICK1;
倍DDX:今DDX/昨DDX,COLOR00FFFF,NODRAW,LINETHICK1;
STICKLINE(进出量<0,0,进出量,1.9,0),COLORFF6600;
STICKLINE(进出量<0,0,进出量,1.4,0),COLORFF9900;
STICKLINE(进出量<0,0,进出量,0.9,0),COLORFFCC00;
STICKLINE(进出量<0,0,进出量,0.4,0),COLORCYAN;
{机构}
DC:=(2*CLOSE+HIGH+LOW+OPEN)/5;
EMDC:=EMA(EMA(EMA(DC,4),4),4);
AA3:= (EMDC-REF(EMDC,1))/REF(EMDC,1)*100, ;
BA:= MA(AA3,2);
机构:(AA3-BA)*30000,COLORRED,NODRAW;
昨机:REF(机构,1),COLORGREEN,NODRAW,LINETHICK1;
前机:REF(昨机,1),COLOR00FFFF,NODRAW,LINETHICK1;
STICKLINE(进出量>0,0,进出量,1.9,0),COLOR000099;
STICKLINE(进出量>0,0,进出量,1.4,0),COLOR0000CC;
STICKLINE(进出量>0,0,进出量,0.9,0),COLOR0000FF;
STICKLINE(进出量>0,0,进出量,0.4,0),COLORCC66FF;
{ 散户}
CC3:=EMA(CLOSE,5)-EMA(CLOSE,55);
DD3:=EMA(CC3,10);
散户:(CC3-DD3)*20000,COLORRED,NODRAW;
昨散:REF(散户,1),COLORGREEN,NODRAW,LINETHICK1;
前散:REF(昨散,1),COLOR00FFFF,NODRAW,LINETHICK1;
{用法:双方资金流向一致看涨}
{满仓}
MA2:=EMA(C,2);
MA5:=EMA(C,5);
EMA13:=EMA(C,13);
EMA30:=EMA(C,30);
YCX:=MA5>=REF(MA5,1);
H5:=MAX(MAX(MA5,EMA13),EMA30);
L5:=MIN(MIN(MA5,EMA13),EMA30);
一阳穿三线:= H5REF(MA2,1);
IF(一阳穿三线,18,0),COLORFFFF00,DOTLINE,LINETHICK1;
DRAWTEXT(一阳穿三线,10,'满仓'),COLORFFFF00;
{青云}
AA05:=MA(C,5);
五日乖离率:=(C-AA05)/AA05*100;
AA30:=MA(C,30);
三拾日乖离率:=(C-AA30)/AA30*100;
MR:=COUNT(CROSS(五日乖离率,0),3)>=1 AND 三拾日乖离率>REF(三拾日乖离率,1) AND AA05>REF(AA05,1) AND (C/REF(C,1)-1)*100>5 AND REF(C,1)
IF(FILTER(MR,10),-18,0),COLOR00FFFF,DOTLINE,LINETHICK1;
DRAWTEXT(FILTER(MR,10),-10,'青云'),COLOR00FFFF;
0,COLORCBCBC0;
{
选股公式:
MA2:=EMA(C,2);
MA5:=EMA(C,5);
EMA13:=EMA(C,13);
EMA30:=EMA(C,30);
YCX:=MA5>=REF(MA5,1);
H5:=MAX(MAX(MA5,EMA13),EMA30);
L5:=MIN(MIN(MA5,EMA13),EMA30);
一阳穿三线:H5REF(MA2,1);
}
从图中观察到的是一个个量柱的走势形态,显示的是买卖量的变化,能够帮助投资者分析进出量的变化,以及在均线的走势中,选择个股的一个辅助工具。
TAG:ddx指标