Q1:急求MACD指标下载。

第一个公式《通达信》
DIFF:= EMA(CLOSE,12) - EMA(CLOSE,26);
DIF:EMA(CLOSE,12) - EMA(CLOSE,26),COLORRED;
DEA:EMA(DIF,9),COLORBLUE;
MACD:2*(DIF-DEA),COLORSTICK;
FH1:=REF(MACD,1)<REF(MACD,2) AND REF(MACD,2)<REF(MACD,3) AND REF(MACD,3)<REF(MACD,4);
FH2:=MACD>=0 AND COUNT(MACD>REF(MACD,1),1)=1;
FH3:=FH1 AND FH2 AND EMA(C,13)>REF(EMA(C,13),1);
FH4:=FH1 AND FH2 AND ABS((DIF-DEA)/C)<0.018;
FH5:=FH1 AND FH2 AND MACD<0.10;
VV:=CLOSE>OPEN AND MA(CLOSE,5)>MA(CLOSE,10) AND MA(CLOSE,10)>MA(CLOSE,30)
AND DIFF>DEA AND MACD>REF(MACD,1) AND DIFF>0 AND DEA>0 AND
MA(VOL,5)>MA(VOL,34) AND MA(CLOSE,30)>=REF(MA(CLOSE,30),1);
佛手:IF(VV,1,0),NODRAW;
DRAWICON(佛手,0.06,11);
二次翻红:(FH3 OR FH4 OR FH5),COLORRED,NODRAW;
低买:CROSS(DIF,DEA) AND DIF<0,COLORFF00FF,NODRAW;
加油:CROSS(DIF,DEA) AND DIF>0,COLORYELLOW,NODRAW;
DRAWICON(二次翻红,-0.05,1);
DRAWTEXT(二次翻红,-0.15,'↖翻红'),COLORRED;
DRAWTEXT(CROSS(DIF,DEA) AND DIF<0,DEA-0.02,'↖低买'),COLORFF00FF;
DRAWTEXT(CROSS(DIF,DEA) AND DIF>0,DEA-0.05,'↖加油'),COLORYELLOW;
XG:二次翻红 OR 低买 OR 加油,NODRAW;
YLZC:=IF(CLOSE=INDEXC,(INDEXC+INDEXH+INDEXL+INDEXO)/4,AMOUNT/(VOL+0.01)/100);
阻价:=IF(CLOSE=INDEXC,YLZC+INDEXC-INDEXL,YLZC+(CLOSE-LOW));
支价:=IF(CLOSE=INDEXC,INDEXL+INDEXC-YLZC,LOW+(CLOSE-YLZC));
今压:REF(阻价,1),LINETHICK0,COLORAA11BB,NODRAW;
今撑:REF(支价,1),LINETHICK0,COLOR009900,NODRAW;
明压:阻价,LINETHICK0,NODRAW;
明撑:支价,LINETHICK0,NODRAW;
第二个公式《通达信》
SQX:=(C-MA(CLOSE,13))*100;
DIF:EMA(MA(SQX,7),1),LINETHICK1;
DEA:EMA(DIF,7),LINETHICK1;
MACD: (DIF-DEA)*2,COLORSTICK;
红柱持股:IF(MACD>REF(MACD,1),MACD,DRAWNULL),STICK,COLORRED,LINETHICK1;
绿柱持币:IF(MACD<REF(MACD,1),MACD,DRAWNULL),STICK,COLORLIBLUE,LINETHICK2;
低位金叉:IF(CROSS(DIF,DEA) AND DIF<-0.1,0.3,0),COLORYELLOW,POINTDOT;
STICKLINE(低位金叉,0,10,8,1),COLORYELLOW;
DRAWICON(低位金叉,0.3,1);
JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
二次金叉:IF(CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1,0.2,0),COLORFF00FF,POINTDOT;
STICKLINE(二次金叉,25,15,8,1),COLORFF00FF;
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:IF(REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA),0.1,0),COLORRED,POINTDOT;
STICKLINE(底背离,40,30,8,1),COLORRED;
DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED;
A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
顶背离:REF(CLOSE,A2+1)<CLOSE AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF),COLORGREEN;
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN;
A3:=CROSS(DIF,DEA) AND DEA<0;
零下二次金叉:IF(FILTER(COUNT(A3,21)=2,10),0.05,0),COLORWHITE,POINTDOT;
STICKLINE(零下二次金叉,45,55,8,1),COLORWHITE;
金叉:DRAWICON(CROSS(DIF,DEA),DIF,1);
死叉:DRAWICON(CROSS(DEA,DIF),DIF,2);
第三个公式 金牌MACD《通达信》
DIFF:EMA(CLOSE,12)-EMA(CLOSE,27);
DEA:EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
STICKLINE(MACD>=0,MACD,0,2,1),COLORF00FF0;
STICKLINE(MACD<0,MACD,0,2,1),COLORWHITE;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR00AAFF;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR00BBFF;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR00CCFF;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR00DDFF;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR00EEFF;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR00FFFF;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR0000AA;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR0011BB;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR0022CC;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR0033DD;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR0044EE;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR0055FF;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORAA00BB;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORBB11BB;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORCC22BB;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORDD33BB;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLOREE44BB;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORFF55BB;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORFFAA00;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORFFBB11;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORFFCC22;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORFFDD33;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORFFEE44;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORFFFF55;
IF(DIFF<0,DIFF,0),COLORRED,LINETHICK1;
IF(DIFF<0,0,DIFF),COLORYELLOW,LINETHICK1;
IF(DIFF<DEA,DIFF,DEA),COLOR00FF00,LINETHICK1;
IF(DIFF>DEA,DEA,DEA),COLORWHITE,LINETHICK1;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
STICKLINE(低位金叉,0,-0.18,2,0),COLORYELLOW;
DRAWTEXT(低位金叉,-0.1,' 低位金叉'),COLORYELLOW;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,0,-0.18,2,0),COLORFF00FF;
DRAWICON(二次金叉,DEA*1.04,13) ;
DRAWTEXT(二次金叉,-0.1,' 二次金叉'),COLORFF00FF;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
STICKLINE(底背离,0,0.13,2,0),COLOR00FF00;
DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;
DRAWTEXT(底背离,0.1,' 底背离'),COLOR00FF00;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;
第四个选股公式《通达信》
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;

Q2:MACD指标有哪几种形态

MACD指标中的DIF和MACD、DIF和DEA两线,按照其金叉时在零轴上、下的位置,和金叉前是否发生过死叉、死叉发生的位置,有八种形态图形,它们分别是:
1、佛手向上
DIF与DEA金叉后,随股价上行而向上,接下来又跟着股价回调而向下。通常是主力洗盘时,股价回调使得DIF回调到MACD线附近后,DIF线立即调头向上,形成佛手向上的形态。此时的均线系统往往是多头排列。
2、小鸭出水
DIF在0轴以下金叉DEA线以后,并没有上穿0轴或上穿一点就回到0轴之下,然后向下死叉DEA,几天以后再次金叉DEA线,该形态为股价在下跌探底之后,抛盘穷尽之时呈现的底部形态,应理解为见底反弹信号,可择机入市。此时的均线系统往往是空头排列。
3、漫步青云
DIF线在零轴上死叉DEA线,继续下穿零轴,在零轴或零轴以上金叉DEA。此时的K线形态往往是穿越了、或正在穿越重要的均线。该形态形成是股价在探底回升途中做盘整,也有的是筑底形态,呈上攻之势,应理解为积极介入信号,应果断入市。
4、天鹅展翅
DIFF在0轴以下金叉DEA线,随后没有上穿0轴就回调,向DEA靠拢,MACD红柱缩短,但没有死叉DEA就再次反转向上,同时配合MACD红柱加长,便形成天鹅展翅形态。该形态的形成多为底部形态,是股价在下跌探底之后,抛盘穷尽之时呈现的底部形态,应理解为主力建仓区域,可择机介入。
5、空中缆绳
DIF在零轴下金叉DEA后在零轴上运行一段时间后,股价调整、DIF也向下回调,当DIFF调到DEA线的时候,,两线粘合成或几乎成一线。在它们分离并多头发散、形成为买入时机,新的涨势开始。该形态的出现多为上档盘整和主力洗盘所为,股价在上升途中做短暂的盘整后,呈现强势上攻形态,应理解为积极介入信号,果断买入。
此形态和空中缆车的主要区别在于:它不死叉,而空中缆车发生死叉! 相同点是:它们的均线系统往往都是多头排列。
6、空中缆车
DIFF线在0轴之上死叉DEA线,但不下穿0轴,过几天即再次在0轴以上金叉DEA。该形态的出现多为上档盘整,主力洗盘所为,股价做短暂的调整后,呈现强劲上升动力,可理解为积极介入信号,可果断买入,如能连续放量更可坚决看多。
7、海底电缆
MACD在零轴下运行一个月以上的较长时间,DIF在零轴下金叉DEA后,两线粘合成一线、数值几乎相等,两线一旦开始向上多头发散,就可考虑买入。0轴以下的海底电缆形态的形成,多为股价在下跌探底以后,抛盘穷尽时呈现的底部形态,这时主力介入,进入压箱底吸货所致,应理解为择机入市。
8、海底捞月
DIFF在0轴以下产生的二次金叉,表明该股打底完成,开始走出底部,可以择机介入。此时的均线系统往往是多头排列,而股价却又在重要均线下方。
这些可以慢慢去领悟,新手前期可用个模拟炒股先去练习一段时日,从模拟中找些经验,等有了好的效果再运用到实战中去,实在把握不准的话可用个牛股宝手机炒股去跟着里面的牛人去操作,这样也要稳妥得多,愿能帮助到您,祝投资愉快!

Q3:求助MACD顶底背离公式!谢谢大虾~~~

DIFF:EMA(CLOSE,12)-EMA(CLOSE,27);
DEA:EMA(DIFF,9);
MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK2;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
STICKLINE(低位金叉,0,0.08,6,0),COLORYELLOW;
DRAWTEXT(低位金叉,0.16,' 低位金叉'),COLORWHITE;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,0,0.06,6,0),COLORFF00FF;
DRAWICON(二次金叉,DEA*0.9,1) ;
DRAWTEXT(二次金叉,0.2,' 二次金叉'),COLORYELLOW;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
STICKLINE(底背离,0,0.03,6,0),COLOR00FF00;
底背:DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK4;
DRAWTEXT(底背离,0.12,' 底背离'),COLORFF00FF;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
顶背:DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK4;
DRAWTEXT(低位金叉 AND 二次金叉 AND 底背离,0.25,'三全项'),COLOR0000FF,LINETHICK2;
试试这个 多对比 与其他指标结合使用

Q4:macd 佛手向上选股 通达信的公式 做二个选股公式 加油和翻红 是选股

加油1:CROSS(DIF,DEA) AND DIF>0,NODRAW;
二次翻红 公式里直接有

Q5:macd 佛手向上选股 通达信的公式 做二个选股公式 加油和翻红 是选股

加油1:CROSS(DIF,DEA) AND DIF>0,NODRAW;
二次翻红 公式里直接有

Q6:请高手帮忙写一个MACD金叉并且平行向上的选股公式(不含未来),谢谢!

{对“平行向上”--的理解,见下面的表达:}

XG:BARSLAST(CROSS(MACD.DIF,MACD.DEA))<=10 AND  ABS(MACD.DIF-MACD.DEA)/MAX(MACD.DIF,MACD.DEA)>=0.1 AND ABS(MACD.DIF-MACD.DEA)/MAX(MACD.DIF,MACD.DEA)<0.5 AND MACD.DIF>MACD.DEA;

===================================

{MACD 必须是在0轴以下金叉。}

XG:BARSLAST(CROSS(MACD.DIF,MACD.DEA))<=10 AND  ABS(MACD.DIF-MACD.DEA)/MAX(MACD.DIF,MACD.DEA)<-0.1 AND ABS(MACD.DIF-MACD.DEA)/MAX(MACD.DIF,MACD.DEA)>-0.5 AND MACD.DIF>MACD.DEA AND MACD.DIF<0 AND MACD.DEA<0 ;