源码如下:
{DDX普通行情版 大智慧普通板的DDX指标}
AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
买量:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),LINETHICK0,COLORRED;
卖量:=IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-AA*(HIGH-LOW),0-VOL/2)),LINETHICK0;
进出量:=买量+卖量,COLOR00FFFF;
STICKLINE(进出量<0,0,进出量,4,0),COLORFF6600,linethick2;
STICKLINE(进出量<0,0,进出量,3,0),linethick2,COLORFF9900;
STICKLINE(进出量<0,0,进出量,1.5,0),linethick2,COLORFFCC00;
STICKLINE(进出量<0,0,进出量,0.5,0),linethick2,COLORf0f000;
STICKLINE(进出量>0,0,进出量,4,0),linethick2,COLOR000099;
STICKLINE(进出量>0,0,进出量,3,0),linethick2,COLOR0000CC;
STICKLINE(进出量>0,0,进出量,1.5,0),linethick2,COLOR0000FF;
STICKLINE(进出量>0,0,进出量,0.5,0),linethick2,COLORCC66FF;
N:=5;
M:=13;
N日内净流入:SUM(进出量,N),LINETHICK1,COLORYELLOW;
流入:REF(N日内净流入,1), COLORred;
连红天:(进出量>0);
M日内翻红天:COUNT(进出量>0,M);
走熊天:(N日内净流入<0);
走牛天:(N日内净流入>0);
强势天:((N日内净流入>REF(N日内净流入,1))>0 AND N日内净流入>0);
弱势天:((N日内净流入<REF(N日内净流入,1))>0 AND N日内净流入<0);
|
|
|
|
|