通達信MACDK線指標公式
{單根K線}
{大陽,大陰}
大陽:=O=L AND C=H AND O<>C;
大陰:=O=H AND C=L AND O<>C;
DRAWTEXT(大陽,LOW,大陽線);
DRAWTEXT(大陰,LOW,大陰線);
{高檔流星,低檔倒狀鐵錘,影線越長效力越大}
陽流星:=O=L AND C<H AND O<>C AND 2*(ABS(C-O))<=H-C;
陰流星:=C=L AND C<H AND O<>C AND 2*(ABS(C-O))<=H-O;
DRAWTEXT(陽流星,LOW,陽流星);
DRAWTEXT(陰流星,LOW,陰流星);
{高檔上吊,低檔鐵錘,影線越長效力越大}
陽上吊:=C=H AND C>O AND C>L AND 2*(ABS(C-O))<=O-L;
陰上吊:=O=H AND O>C AND O>L AND 2*(ABS(C-O))<=C-L;
DRAWTEXT(陽上吊,LOW,陽上吊);
DRAWTEXT(陰上吊,LOW,陰上吊);
{紡錘,具有上吊和流星的特點}
{陽紡錘:=L<O AND O<C AND C<H;
陰紡錘:=L<C AND C<O AND O<H;
DRAWTEXT(陽紡錘,LOW,陽紡錘);
DRAWTEXT(陰紡錘,LOW,陰紡錘);};
{十字星}
十字星:=C=O AND L<C AND H>C;
DRAWTEXT(十字星,LOW,十字星);
{==================================多頭===================================}
{二根K線組合}
貫穿線:= REF(C,1)<REF(O,1) AND C>O AND C>=(REF(O,1)-REF(C,1))/2+REF(C,1) AND O<REF(C,1) AND C<REF(O,1) ;
DRAWTEXT(貫穿線,LOW*0.995,貫穿線)COLORRED;
吞噬線:=C>O AND C>REF(MAX(O,C),1) AND O<REF(MIN(O,C),1);
DRAWTEXT(吞噬線,LOW*0.995,陽吞噬)COLORRED;
頸入線:= REF(C,1)<REF(O,1) AND C>O AND C<=(REF(O,1)-REF(C,1))/2+REF(C,1) AND O<REF(C,1) AND C<REF(O,1) AND C>REF(C,1) ;
DRAWTEXT(頸入線,LOW*0.995,頸入線)COLORYELLOW;
頸上線:= REF(C,1)<REF(O,1) AND C>O AND C<=(REF(O,1)-REF(C,1))/2+REF(C,1) AND O<REF(C,1) AND C<REF(O,1) AND C<=REF(C,1) AND C>REF(L,1) ;
DRAWTEXT(頸上線,LOW*0.995,頸上線)COLORGREEN;
{低星形:=REF(MAX(C,O),1)-REF(MIN(C,O),1)>(MAX(C,O)-MIN(C,O))*2 AND MAX(C,O)<REF(MIN(C,O),1) ;
DRAWTEXT(低星形,LOW*0.995,低星形)COLORRED;
高星形:=REF(MAX(C,O),1)-REF(MIN(C,O),1)>(MAX(C,O)-MIN(C,O))*2 AND MIN(C,O)>REF(MAX(C,O),1) ;
DRAWTEXT(高星形,LOW*0.995,高星形)COLORGREEN;}
多孕線:= REF(C,1)<REF(O,1) AND MIN(C,O)>REF(MIN(C,O),1) AND MAX(C,O)<REF(MAX(C,O),1);
DRAWTEXT(多孕線,LOW*0.995,多孕線)COLORYELLOW;
上升反拖線:=REF(C,1)>REF(MA(C,5),1)AND REF(C,1)>REF(MA(C,10),1) AND REF(C,1)>REF(O,1) AND O<REF(C,1) AND O>REF(O,1) AND C<REF(O,1);
DRAWTEXT(上升反拖線,LOW*0.995,上升反拖線)COLORRED;
{三根K線組合}
外側三陽:=REF(C,1)>REF(O,1) AND REF(C,1)>REF(MAX(O,C),2) AND REF(O,1)<REF(MIN(O,C),2) AND C>REF(C,1) AND C>O;
DRAWTEXT(外側三陽,LOW*0.99,外側三陽)COLORMAGENTA;
晨星:=REF(MAX(C,O),2)-REF(MIN(C,O),2)>(REF(MAX(C,O),1)-REF(MIN(C,O),1))*2 AND REF(MAX(C,O),1)<REF(MIN(C,O),2) AND MAX(C,O)-MIN(C,O)>(REF(MAX(C,O),1)-REF(MIN(C,O),1))*2 AND MIN(C,O)>REF(MAX(C,O),1) AND C>O AND C>=(REF(MAX(C,O),2)-REF(MIN(C,O),2))/2+REF(MIN(C,O),2);
DRAWTEXT(晨星,LOW*0.99,晨星)COLORMAGENTA;
內困三紅:= REF(C,2)<REF(O,2) AND REF(MIN(C,O),1)>REF(MIN(C,O),2) AND REF(MAX(C,O),1)<REF(MAX(C,O),2)AND C>REF(MAX(C,O),1);
DRAWTEXT(內困三紅,LOW*0.99,內困三紅)COLORMAGENTA;
{====================================空頭=======================================}
{二根K線組合}
烏云蓋頂:=REF(C,1)>REF(MA(C,5),1) AND REF(C,1)>REF(O,1) AND O>C AND O>REF(C,1) AND C<REF((C+O)/2,1) AND C>REF(O,1) ;
DRAWTEXT(烏云蓋頂,H*1.02,烏云蓋頂)COLORLIGREEN;
陰吞噬:=REF(C,1)>REF(MA(C,5),1) AND REF(C,1)>REF(O,1) AND O>C AND O>REF(C,1) AND C<REF((C+O)/2,1) AND C<REF(O,1) ;
DRAWTEXT(陰吞噬,H*1.02,陰吞噬)COLORLIGREEN;
空孕線:=REF(C>O,1) AND MIN(C,O)>REF(O,1) AND MAX(C,O)<REF(C,1) AND REF(C>MA(C,5),1);
DRAWTEXT(空孕線,H*1.02,空孕線)COLORLIGREEN;
{三根K線組合}
最后包容線:=REF(C>MA(C,5),2) AND REF(C>O,2)AND REF(O>C,1)AND REF(O,1)>REF(C,2) AND REF(C,1)<REF(C,2) AND O<REF(C,1)AND C>REF(O,1) AND REF(C,1)>REF(O,2);
DRAWTEXT(最后包容線,H*1.03,包容線)COLORCYAN;
夜星:=REF(C>MA(C,5),2) AND REF(C>O,2) AND REF(O,1)>REF(C,2) AND REF(C,1)>REF(C,2) AND O<REF(MIN(C,O),1) AND C<REF((C+O)/2,2);
DRAWTEXT(夜星,H*1.03,夜星)COLORCYAN;
崩盤:=REF(C>MA(C,5),2) AND REF(C>O,2) AND REF(MAX(C,O),1)< REF(O,2) AND O<REF(MIN(C,O),1) AND C<O;
DRAWTEXT(崩盤,H*1.03,崩盤)COLORCYAN;
雙鴉:=REF(C>O,2) AND REF(O,1)>REF(C,2) AND REF(C,1)>REF(C,2) AND REF(C<O,1) AND O>REF(O,1) AND C<REF(C,1);
DRAWTEXT(雙鴉,H*1.03,雙鴉)COLORCYAN;
通達信K線理論基礎主圖指標公式的選股公式