以下是通达信模拟资金副图源码
时间:=BARSLAST(TIME2=145900);
AA:=2;
N3:=BARSLAST(CROSS(时间,AA));
N4:=BARSLAST(CROSS(AA,时间));
跟踪:=IF(N3<N4,N3+1,0);
买:=IF(O=C AND (C-REF(C,1))/REF(C,1)*100>9.8,AMOUNT,AMOUNT/((H-L)*2-ABS(O-C))*(C-L));
买%:买/AMOUNT*100,COLORRED,NODRAW;
流入亿元:=AMOUNT*买%/10000000000,COLORMAGENTA,NODRAW;
流出亿元:=AMOUNT/100000000-流入亿元,COLORGREEN,NODRAW;
买量:(流入亿元-REF(流入亿元,跟踪))/REF(流入亿元,跟踪)*100,COLORRED;
卖量:(流出亿元-REF(流出亿元,跟踪))/REF(流出亿元,跟踪)*100,COLORGREEN;