通达信资金方向2-比DDX强的副图指标(原理,源码)
资金方向2
N(1 100 5)
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,NODRAW;
主卖:IF(CLOSE OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE OPEN,0-VAR1*(HIGH-LOW),0-VOL/2)),COLOR00FF00,NODRAW;
DDX:(主买+主卖)*10000/FINANCE(7),NODRAW,COLORFF0099;
大单动向:=SUM(DDX,N);
STICKLINE(大单动向 0,0,大单动向,2,0),COLORRED;
STICKLINE(大单动向 0,0,大单动向,2,0),COLORCYAN;