在线检测未来函数

通达信新改编主动买卖盘指标公式

来源:Internet,编辑:股旁网,2017-09-19

{使用说明:主动买卖盘以百分比显示彩柱,淡洋红色为主动买盘,深绿色为主动卖盘,就是以深绿色为背景,以淡洋红色从下往上覆盖来显示比例。为了区别于量柱,主动买卖盘柱比量柱设置细了一点,这样可以看清量柱随K线涨跌而改变的红、青颜色。}

量:VOL,VOLSTICK;
{预测量}
VAR1:=DYNAINFO(17)*REF(MA(VOL,5),1);
VAR2:=DYNAINFO(7)=CLOSE AND DYNAINFO(10)=AMOUNT;
预测量:IF(DYNAINFO(7)=CLOSE AND DYNAINFO(10)=AMOUNT,VAR1,VAR2);
STICKLINE(IF(DYNAINFO(7)=CLOSE AND DYNAINFO(10)=AMOUNT,VAR1,VAR2),0,VAR1,4,1);
{量比}
TT:=IF(HOUR>12,(HOUR-13)*60+MINUTE+120,(HOUR-9)*60+MINUTE-30);
P:=IF(ISLASTBAR,BARSLAST(TT=1),0);
T:=BACKSET(P,P+1);
VV:=IF(T=1,V,0);
量比:100*DYNAINFO(17)*(SUM(VV,TT)/TT)/(DYNAINFO(8)/FROMOPEN),;
换手率%:VOL/CAPITAL*100;
{主动买卖盘}
AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主动买盘:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),COLORRED;
主动卖盘:=IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-AA*(HIGH-LOW),0-VOL/2)),COLORGREEN;
主动买盘%:主动买盘/VOL*100,COLOR6600FF,NODRAW;
主动卖盘%:ABS(主动卖盘/VOL*100),COLOR008800,NODRAW;
STICKLINE(VOL>0,0,VOL,0.8,0),COLOR008800;
STICKLINE(主动买盘>0,0,主动买盘,0.8,0),COLOR6600FF;

通达信新改编主动买卖盘指标公式

 

相关文章