以下是通达信买卖成交量公式副图K线图原创性指标(无源码的请下载附件导入)
{主动买卖盘}
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;
VAR1:=主动买盘+主动卖盘;
DIF:=EMA(VAR1,SHORT)-EMA(CLOSE,LONG);
DEA:=EMA(DIF,MID);
MACD:=(DIF-DEA)*2,COLORSTICK,NODRAW;
0,COLORRED;
MACDHS:=IF(MACD>0 AND MACD>REF(MACD,1),MACD,0);
MACDHX:=IF(MACD>0 AND MACD<REF(MACD,1),MACD,0);
MACDLX:=IF(MACD<0 AND MACD<REF(MACD,1),MACD,0);
MACDLS:=IF(MACD<0 AND MACD>REF(MACD,1),MACD,0);
STICKLINE(MACDHS>0,0,MACD,2,0),COLORRED;
STICKLINE(MACDHX>0,0,MACD,2,0),COLORYELLOW;
STICKLINE(MACDLX<0,MACD,0,2,0),COLORCYAN;
STICKLINE(MACDLS<0,MACD,0,2,0),COLORLIGREEN;
{绿柱面积:IF (MACD<0,SUM(MACD,BARSLAST(MACD>0)),0)/10000,NODRAW,COLORCYAN;
红柱面积:IF (MACD>0,SUM(MACD,BARSLAST(MACD<0)),0)/10000,NODRAW,COLORRED;
DRAWNUMBER(REF(MACD,1)>0 AND MACD<=0 ,HHV(MACD,8),REF(红柱面积,1)),COLORRED;
DRAWNUMBER(REF(MACD,1)<0 AND MACD>=0 ,LLV(MACD,4),REF(ABS(绿柱面积),1)),COLORCYAN;
DRAWNUMBER(ISLASTBAR AND MACD<0,LLV(MACD,8),ABS(绿柱面积)),COLORCYAN;
DRAWNUMBER(ISLASTBAR AND MACD>0,HHV(MACD,4),ABS(红柱面积)),COLORRED;};
换手: VOL*10000/FINANCE(7),NODRAW,COLORGREEN; {DYNAINFO(37)*100};
量比: V/REF(MA(V,5),1),COLORBROWN,NODRAW;
77477809.png
|