通达信MACD强弱公式源码K线图

通达信公式MACD强弱

M :=9;
P1:=5;
P2:=10;
P3:=20;
P4:=30;
LONG:=26;
SHORT:=12;
MA1:= EMA(C,P1);
MA2:= EMA(C,P2);
MA3:= EMA(C,P3);
MA4:= EMA(C,P4);
MA5:= MA(C,120);
换手率:=(VOL*100/FINANCE(7));
N:=26; P:=20;
MID := MA(CLOSE,N);
UPPER:=MID + P/10*STD(CLOSE,N);
LOWER:=MID - P/10*STD(CLOSE,N);
多头排列:=MA1>MA2 AND MA2>MA3 AND MA2>MA4 AND MA4>REF(MA4,5);
空头排列:=MA1<MA2 AND MA2<MA3 AND MA3<MA4;
上升趋势:=MA4>REF(MA4,3) AND MA4>REF(MA4,1) AND MA1>MA4;
下跌趋势:=MA4<REF(MA4,3) AND MA4<REF(MA4,1) AND MA1<MA4;
{【MACD指标分析】}
DIF :EMA(CLOSE,SHORT)-EMA(CLOSE,LONG),COLORCCFFFF;
DEA :EMA(DIF,M),COLOR58FF58;
MACD:=2*(DIF-DEA),COLORFFFF00,LINETHICK0;
STICKLINE(MACD>=0 AND MACD>=REF(MACD,1),0,MACD,2,0),COLOR6058FF;
STICKLINE(MACD>=0 AND MACD< REF(MACD,1),0,MACD,2,1),COLOR6058FF;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,2,1),COLORFFFF00;
STICKLINE(MACD<0 AND MACD< REF(MACD,1),0,MACD,2,0),COLORFFFF00;
多头趋势:=IF(DIF>=0 AND DEA>=0 OR (DIF<0 AND DEA>=0),1,0);
空头趋势:=DIF<0 AND DEA<0 OR (DIF>=0 AND DEA<0);
MACD绿柱缩短:=MACD<0 AND ABS(MACD)< REF(ABS(MACD),1) AND REF(MACD,1)<0;
MACD红柱缩短:=MACD>0 AND MACD< REF(MACD,1);
缩头:=IF(MACD>0 AND REF(MACD,1)>REF(MACD,2) AND REF(MACD,2)>REF(MACD,3) AND MACD< REF(MACD,1),1,0) AND REF(MACD,1)>0.150;
缩脚:=IF(MACD<0 AND REF(MACD,1)< REF(MACD,2) AND REF(MACD,2)< REF(MACD,3) AND MACD>REF(MACD,1),1,0) AND REF(MACD,1)<-0.100;
金叉:=CROSS(DIF,DEA);
死叉:=CROSS(DEA,DIF);
轴下死叉:=死叉 AND DEA<0;
轴上死叉:=死叉 AND DEA>0;
轴下金叉:=金叉 AND DEA<0;
轴上金叉:=金叉 AND DEA>0;
轴上二次金叉:=COUNT(CROSS(DIF,DEA) AND DEA>0,20)=2 AND CROSS(DIF,DEA) AND DEA>0;
轴上三次金叉:=COUNT(CROSS(DIF,DEA) AND DEA>0,20)=3 AND CROSS(DIF,DEA) AND DEA>0;
NOTEXT1:DIF,COLORCCFFFF;
NOTEXT2:DEA,COLOR58FF58;
DRAWTEXT_FIX(ISLASTBAR AND 金叉 AND NOT(轴下金叉) AND NOT(轴上金叉) AND NOT(轴上二次金叉),0.6,0,0,"金叉--属强势信号"),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR AND 轴下金叉,0.6,0,0,"DEA和DIF在0轴下金叉"),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR AND 轴下死叉,0.6,0,0,"DEA和DIF在0轴下死叉"),COLORYELLOW;
 




未来函数检测结果如下:
该公式包含未来函数:FINANCE
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图