通达信甲乙DDX指标公式

时间:2022-03-17 06:56:17    阅读:298

 M:=10;
N:=3;
VOL,VOLSTICK;
MA6:MA(VOL,6);
MA36:MA(VOL,36);
VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主买:=IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),COLORRED,POINTDOT;
主卖:=IF(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-VAR1*(HIGH-LOW),0-VOL/2)),COLOR00FF00,POINTDOT;
STICKLINE(VOL>0,VOL,0,1,0),COLORWHITE;
STICKLINE(主买>0,0,主买,1,0),COLORLIRED;
买卖差:=(主买+主卖);
买卖比:ABS(主买/主卖);
N日内净流入:SUM (买卖差,N), LINETHICK2,COLORGREEN;
流入:IF (N日内净流入>REF(N日内净流入,1),N日内净流入,DRAWNULL),COLORMAGENTA,LINETHICK2;
M日内翻红天数:=COUNT(买卖差>0,M);
连红天数:=BARSLASTCOUNT(买卖差>0);

 

关键词: ADX