同花顺量能源码附图
-
相关简介:AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN)); 买量:=IF(CLOSEOPEN,AA*(HIGH-LOW),IF(CLOSEOPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),LINETHICK0,colorred; 卖量:=IF(CLOSEOPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSEOPEN,0-AA*(HIGH-LOW),0-VOL/2)),LINETHICK0,colorcyan;
-
文章来源:股海网作者:股海网发布时间:2017-04-01浏览次数:
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,colorcyan;
进出量:=买量+卖量,COLOR00FFFF;
STICKLINE(进出量<0,0,进出量,4,0),COLORFF6600;
STICKLINE(进出量<0,0,进出量,3,0),COLORFF9900;
STICKLINE(进出量<0,0,进出量,1.5,0),COLORFFCC00;
STICKLINE(进出量<0,0,进出量,0.5,0),colorcyan;
STICKLINE(进出量>0,0,进出量,4,0),COLOR000099;
STICKLINE(进出量>0,0,进出量,3,0),COLOR0000CC;
STICKLINE(进出量>0,0,进出量,1.5,0),COLOR0000FF;
STICKLINE(进出量>0,0,进出量,0.5,0),COLORCC66FF;
N:=2; M:=6; N日内净流入:SUM(进出量,N),LINETHICK2,colorgreen;
流入:IF(N日内净流入>REF(N日内净流入,1),N日内净流入,DRAWNULL),colorred,LINETHICK2;
连红天:BARSLASTCOUNT(进出量>0);
M日内翻红天:COUNT(进出量>0,M),colorred;
走熊天:BARSLASTCOUNT(N日内净流入<0),colorcyan;
走牛天:BARSLASTCOUNT(N日内净流入>0),colorred;
强势天:BARSLASTCOUNT((N日内净流入>REF(N日内净流入,1))>0 AND N日内净流入>0);
弱势天:BARSLASTCOUNT((N日内净流入<REF(N日内净流入,1))>0 AND N日内净流入<0);