同花顺MACD量能分析副图源码
-
相关简介:MACD量能分析 本指标旨在探索换手率,量能与股价的涨跌关系。目前正在测试阶段,谨慎参考。 VAR2:MA(C,13),colorred,LINETHICK3; 上翘:IF(VAR2REF(VAR2,1),VAR2,DRAWNULL),colorred,LINETHICK3; 下拐:IF(VAR2REF(VAR2,1),VAR2,DRAWNULL),colorgreen,LINETHICK3; BIAS:=(CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100; F:=MA(S
-
文章来源:股海网作者:股海网发布时间:2017-09-29浏览次数:
MACD量能分析
本指标旨在探索换手率,量能与股价的涨跌关系。目前正在测试阶段,谨慎参考。
VAR2:MA(C,13),colorred,LINETHICK3;
上翘:IF(VAR2>REF(VAR2,1),VAR2,DRAWNULL),colorred,LINETHICK3;
下拐:IF(VAR2<REF(VAR2,1),VAR2,DRAWNULL),colorgreen,LINETHICK3;
BIAS:=(CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100;
F:=MA(S,121);
RSV:=(CLOSE-LLV(LOW,45))/(HHV(HIGH,45)-LLV(LOW,45))*100;
K:=SMA(RSV,15,1);
D:=SMA(K,15,1);
J:=3*K-2*D;
LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
S1:=IF((J<11 AND BIAS>-11 AND CROSS( S,F) AND (S-F)>0.010),2,0),STICK,LINETHICK3,COLOR00ff00;
DRAWTEXT(S1=2,LOW,'!'), colorgreen;
中轨:HHV(MA(H,13),13),colorwhite,LINETHICK1;
趋势:LLV(MA(H,13),1),colorgreen,LINETHICK2;
短期:100*(C-LLV(L,1))/(HHV(C,1)-LLV(L,1)),colorwhite;
中期:100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10)),colorcyan;
正负:= CLOSE-MA(CLOSE,s);
成交额:IF(正负>0,VOL,-VOL)/1000000;
MA$1:MA(成交额,n1);
MA$2:MA(成交额,n2);
MA$3:MA(成交额,n3);
量能饱和度:IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))>1,1,(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20)))*100,coloryellow;
a:105,colorred;
b:70,colorgreen;
C:50,colorbluee;
N:=9;
TYP := (HIGH + LOW + CLOSE)/3;
RS:=SUM(IF(TYP>REF(TYP,1),TYP*VOL,0),N)/SUM(IF(TYP<=REF(TYP,1),TYP*VOL,0),N);
MFI:=100-100/(1+RS);
资金流量:MFI,NODRAW;
A1:=SUM(IF(MFI>REF(MFI,1),VOL,IF(MFI<REF(MFI,1),-VOL,0)),0);//{OBV}
STICKLINE(MACD>0 AND MACD>=REF(MACD,1),0,MACD,5,0),color0000ff;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),0,MACD,5,0),colorffff00;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,5,0),colorff00ff;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),0,MACD,5,0),color00ff00;
DIFF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);
DEA : EMA(DIFF,M);
MACD : 2*(DIFF-DEA);
Zero : 0;
IF(CODETYPE>0)
{
IF( CODETYPE>2 AND CODETYPE <> 6)
{
a="该指标只用于个股和沪深指数。";
换手:=a*100;
RETURN 0;
}
ELSE
{
a=VOL/SHGZG;
}
}
涨幅:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;
换手率:=a;
N1天平均换手率:=MA(换手率,60);
N1天平均涨幅:=MA(涨幅,N1);
平均动能V:=N1天平均涨幅/N1天平均换手率;
当日动能V:=涨幅/换手率;
平均动能:平均动能V/100;
IF(涨幅<=0 OR CLOSE<=OPEN)
RETURN 0;
IF(当日动能V<=平均动能V)
RETURN 0;
IF(当日动能V>平均动能V*50)
{
DRAWICON(1,0,1);
爆表:0;
RETURN 0;
}
当日动能:当日动能V/100;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
换手率:VOL/SHGZG*100;
N日换手率平滑:EMA(换手率 ,N)