1. Basic formula of ddx index
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 (net inflow in n days, 1), net inflow in n days, DRAWNULL);
Drawband (net inflow in n days, RGB (100,100,100), 0,RGB (0,100,150));
{Band Steering} {3% in 5 days}
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), color yellow;
IF (flowers bloom short, 150000, draw null), cross dot, line thick 6, color ff 33ff;
IF (flowers bloom short, 150000, draw null), point dot, line thick 4, color 00 CCFF;
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));
Bottom deviation: ref (close, A2+1) > close and ref (RSI 1, A2+1)
DRAWLINE(CC2,RSI1,FILTER (bottom deviation > 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;
Early warning: ddx > 0 and ma (v, 5) > ma (ma (v, 5), 5) and cross (ddx1, ddx2), line thick;
Day: = count (ddx > 0,5), colored;
DRAWTEXT (early warning, DDX * 1.06, ‘★’), line thick 3, color 00ffff;
In the display of its trading order, what can be found is the trend analysis of individual stocks with top-bottom deviation combined with other rsi indicators, as well as the flow direction in the trading order.
3. ddx trading tips
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(空方>Pull-up force b, pull-up force b, empty side), LINETHICK2,COLOR00FF00;
Long position: IF (short > =REF (short, 1), short, draw null), colored, line thick 2;
DRAWICON (short > =REF (short, 1) AND REF (short, 1)
Short: IF (short
{DRAWICON (short<=REF(做空,1) AND REF(做空,1)>REF (short, 2), short, 19); }
At this point, the trend in the indicator line is only a line shape, which can clearly show whether stocks should be short or long, and make a basic analysis combined with the degree of pull-up, to help investors identify the basic position of trading points in actual combat.
4. ddx stock selection formula
AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN))/5000;
Buying quantity: = if (close > open, aa * (high-low), if (close)
Selling quantity: = if (close > open, 0-aa * ((high-close)+(open-low)), if (close).
Import and export volume: = buying volume+selling volume;
DDX today: in and out, colored, no draw, line thick 1;
Yesterday DDX:REF (now ddx, 1), color green, no draw, line thick 1;
Times DDX: today DDX/ yesterday ddx, color 00ffff, no draw, line thick 1;
STICKLINE (in and out)<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, in and out, 1.4,0),COLOR0000CC;
STICKLINE (input and output > 0,0, input and output, 0.9,0),COLOR0000FF;
STICKLINE (input and output > 0,0, input and output, 0.4,0),COLORCC66FF;
{retail investors}
CC3:=EMA(CLOSE,5)-EMA(CLOSE,55);
DD3:=EMA(CC3,10);
Retail investors: (CC3-DD3) * 20000, Colored, No Draw;
Yesterday: REF (retail investor, 1), color green, no draw, line thick 1;
Former dispersion: REF (yesterday dispersion, 1), color 00 ffff, no draw, line thick 1;
{Usage: The capital flows of both parties are consistently bullish}
{Man Cang}
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);
One Yang crosses three lines: = H5REF(MA2,1);
IF (one yang crosses three lines, 18,0), colorffff00, dotline, linethick 1;
DRAWTEXT (one yang crosses three lines, 10,’ Man Cang’), COLORFFFF00;
{Qingyun}
AA05:=MA(C,5);
Five-day deviation rate: =(C-AA05)/AA05*100;
AA30:=MA(C,30);
30-day deviation rate: =(C-AA30)/AA30*100;
MR:=COUNT(CROSS (five-day deviation rate, 0),3)>=1 AND thirty-day deviation rate > REF (thirty-day deviation rate, 1) and aa05 > ref (aa05,1) and (c/ref (c, 1)-1) * 100 > 5 and ref (c).
IF(FILTER(MR,10),-18,0),COLOR00FFFF,DOTLINE,LINETHICK1;
DRAWTEXT(FILTER(MR,10),-10,’ Qingyun’), COLOR00FFFF;
0,COLORCBCBC0;
{
Stock selection formula:
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);
One Yang crosses three lines: H5REF(MA2,1);
}
What is observed from the figure is the trend pattern of each measuring column, which shows the change of trading volume, which can help investors analyze the change of import and export volume, and is an auxiliary tool for selecting individual stocks in the trend of moving average.
The above is the related source code formula of ddx indicators explained in this article, hoping to help you in actual combat!