通達信雙龍MACD指標公式原始碼副圖

指标公式分享發表於2024-03-11
{ 通達信雙龍MACD指標公式原始碼副圖 }

{指標介紹:
與傳統MACD不同,MACD柱狀線,金叉後由原來一色變為兩色,紅色和綠色;死叉後由原來一色變為兩色,白色和紫色。
1,當金叉後和MACD數值在0值以上為強勢區, 金叉後整理MACD綠柱變為紅色時
代表股價由弱轉強-加倉,MACD紅柱變為綠色時由強轉弱-減倉。
2,當死叉後,MACD數值進入0值下方為弱勢區,
出現白色清倉退出觀望,出現紫色開始關注,紫色柱逐漸變小可輕倉加入。
與其他MACD不同多一條短線游龍(組合稱雙龍戲水),特點非常敏感,短線走強就翻紅走弱就翻綠。}

DIFF: EMA(CLOSE,12) - EMA(CLOSE,26);
DEA: EMA(DIFF,9);
macd: 2*(DIFF-DEA), COLORSTICK;
STICKLINE(MacD>0,MACD,0,2,1),COLOR0000DC;
STICKLINE(MACD>0 AND MACD<ref(macd,1),macd,0,2,1),color00b400;
STICKLINE(MACD<=0,MACD,0,2,1),COLORGRAY;
STICKLINE(MACD<=0 AND MACD>REF(MACD,1),MACD,0,2,1),COLORC800C8;
XX0:=BArslAST((crOSS(MACD,REF(MACD,1)) AND MACD>0) OR CROSS(MACD,0));
XX1:=BARSLAST(CROSS(0.5,COUNT(MACD>REF(MACD,1),XX0+1)=XX0+1));{回}
XX2:=COUNT(MACD<ref(macd,1),xx1+1)=xx1+1 and="" count(macd<0,xx1+1)<="2;<br"> XX3:=REF(XX2,1) AND MACD>REF(MACD,1) AND C>O AND C>REF(C,1);
STICKLINE(XX1=0 AND MACD>0,MACD,0,2,0),COLORDCDC00;
STICKLINE(XX3,MACD,0,2,0),COLOR0854FF;
ER:=vol/CAPITAL*100;
ZD:=C/REF(C,1)*100-100;
AA0:=BARSLAST(CROSS(0.5,COUNT(MACD<0,3)>=3) AND (MACD>=1 OR DIFF>=2));
AA1:=CROSS(0.5,COUNT(MACD>REF(MACD,1),AA0+1)=AA0+1);
AA2:=REF(HHV(ER,AA0+1),1)>=3 AND REF(HHV(ZD,AA0+3),1)>=5;
BB0:=BARSLAST(AA1 AND AA2);
BB1:=COUNT(MACD<ref(macd,1),bb0+1)=bb0+1;
BB2:=COUNT(MACD<0,BB0+1)<=2 AND (COUNT(C=1);
BB3:=BB1 AND BB2;
BB4:=REF(BB3,1) AND MACD>REF(MACD,1) AND C>O AND ZD>0;
DRAWBAND(DIFF,RGB(200,50,55),DEA,RGB(50,100,10));
trix:=(DIFF-REF(DIFF,1))/REF(DIFF,1)*100;
J1:=0.7*(26-12)/2*EMA((C-REF(C,1)),12);
J2:EMA(EMA(J1,3),3);
J3:EMA(J1,3);
DRAWBAND(J3,RGB(155,50,50),J2,RGB(0,100,50));
JC:CROSS(DIFF,DEA) ,NODRAW;
DRAWICON(JC,DIFF*0.9,1);

相關文章