分类
外匯交易平台排名

真正实现多周期MACD一图上下同列

通达信多空MACD组合指标公式


REF(MacD,1)AND MACD <0,0,MACD,0.5,0),LINETHICK5,COLORFF00FF;
STICKLINE(MACD>REF(MACD,1)AND MACD>0,0,MACD,0.5,0),LINETHICK5,COLORRED;
STICKLINE(MACD 真正实现多周期MACD一图上下同列 STICKLINE(MACD0,0,MACD,0.5,0),LINETHICK5,COLORBLUE;
DEA:DEA1,LINETHICK2,COLORYELLOW;
DIF:DIF1,LINETHICK2,COLORRED;>
DRAWTEXT(CROSS(DIF,DEA),DIF-0.1,' 金叉'),COLORYELLOW;
DRAWICON(CROSS(DIF,DEA),DEA1-0.01,1);
DRAWICON(CROSS(DEA,DIF),DIF-0.2,2);
选股1:((MACD>REF(MACD,1)AND CROSS(DIF,DEA))OR (CROSS(MACD,REF(MACD,1))AND DIF>DEA))*0.5;>
DIF:(ema(CLOSE,7)-EMA(CLOSE,14))*50,LINETHICK2,COLORYELLOW;
MACD:EMA(DIF,3),COLORRED,LINETHICK2;
DEF:2*(DIF-MACD),COLORFFFF00,LINETHICK0;
STICKLINE(DEF>=0 AND DEF>=REF(DEF,1),0,DEF,2,1),COLORRED;
STICKLINE(DEF>=0 AND DEF < REF(DEF,1),0,DEF,2,0),COLORGREEN;
STICKLINE(DEF=REF(DEF,1),0,DEF,2,1),COLORGREEN;
STICKLINE(DEF ST:=IF(DEF>0 AND REF(DEF,1)>REF(DEF,2) AND DEF < REF(DEF,1),1,0);
SJ:=IF(DEFREF(DEF,1),1,0);
ZL:=IF(CROSS(C,MA(C,20)) OR CROSS(C,MA(C,60)),1,0);
ZC:=IF(CROSS(MA(C,20),C) OR CROSS(MA(C,60),C),1,0);
ZD:=IF(CROSS(MACD,DIF) 真正实现多周期MACD一图上下同列 AND DIF>0 AND MACD>0,1,0);
ZK:=IF(CROSS(DIF,MACD) AND DIF DRAWICON(CROSS(DIF,MACD)AND DEF>0,MACD,1);
DRAWICON(CROSS(MACD,DIF),DIF,2);
DRAWICON(CROSS(DIF,MACD)AND DEF>0,DEF,1);
XG:CROSS(DIF,MACD) AND DEF>0;
EE:=MACD-REF(MACD,1)>0.05 AND
COUNT(C/REF(C,1)>1.09,16) C=HHV(H,60) AND
C/REF(C,1)>1.04 AND
NOT(H=L) AND
COUNT(C>O,6) C/REF(C,9) STICKLINE(FILTER(EE,20),Abs(MACD)+1,0,2,0),COLORMAGENTA;
选股:FILTER(EE,20);
VAR1:=(真正实现多周期MACD一图上下同列 HHV(HIGH,21)-C)/(HHV(HIGH,21)-LLV(LOW,21))*100-10; 真正实现多周期MACD一图上下同列
VAR2:=(C-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
VAR3:=SMA(VAR2,13,8);
高位:90;
低位:0;
多方:SMA(VAR3,13,8),COLORRED;
空方:SMA(VAR1,21,8),COLOR00FF00;
中轴:45;
DRAWICON(CROSS(多方,空方),多方,11);
DRAWICON(CROSS(空方,多方),空方,12);

【原创科普】万能指标MACD,掌握她你离高手又近了一步!

MACD, Moving Average Convergence / Divergence ,称为异同移动平均线,是从双指数移动平均线发展而来的,由快的指数移动平均线(EMA12)减去慢的指数移动平均线(EMA26)得到快线DIF,再用2×(快线DIF-DIF的9日加权移动均线DEA)得到MACD柱。MACD的意义和双移动平均线基本相同,即由快、慢均线的离散、聚合表征当前的多空状态和股价可能的发展变化趋势,但阅读起来更方便。MACD的变化代表着市场趋势的变化,不同K线级别的MACD代表当前级别周期中的买卖趋势。

与均线类似,MACD也是平均的,所以就有一定的 滞后性 ,同样,MACD也是用来 表征股票的趋势的 ,通过 对MACD理解和使用,可以让你做更正确的抉择,在正确的时间做正确的事 。

如上圆圈内所示, 上面的白线是快线,下面的黄线是慢线,红色的柱线为能量线,白线在黄线上面,柱线为红色,反正,白线在黄线之下主线为绿色,柱线的长度代表上涨或下跌的强度 。柱线红色绿色的分界线是水平线(零轴线)。

白色快线上穿黄色慢线,为 金叉 ,反之,黄色慢线上穿白色快线为 死叉 。金叉代表趋势向好,或迎来一波上涨,死叉代表趋势向差,或迎来一波下跌。

如上图所示,第一个死叉后,趋势下行,跌了一段时间,企稳见底后MACD开始趋平并且随后金叉,金叉之后走势是震荡走势,也有一定的上涨,但不明显。随着第二次死叉,小幅度调整之后很快就 二次金叉 ,一波持续的趋势上涨后直到 爆出放量阴线,出现死叉,这里也是短期顶部,这里杀进去很容易站岗 。

答案是否定的,一般股票在调整之后MACD基本都是在水平轴下方运行,随着股价的见底企稳,一般在水平轴下方(后面简称水下)形成一次金叉,如上图第一个金叉。 金叉只是表征股票趋势开始向着积极的方向发展,并不一定立马就会上涨, 会有个小幅上涨,震荡小调整蓄势的过程。这个过程往往也是主力资金吸筹建仓的过程,随着主力的建仓完毕,第二个死叉的位置有一波小调整(洗掉不坚定的筹码),然后开始上涨,出现第二次金叉,接着一波凌厉的趋势上涨,所以也有二次金叉买入的说法。 高位的见顶往往伴随着放量阴线,均线死叉,MACD死叉。

关于MACD能量柱,其 长度代表上涨或下跌的强度 ,还以上证指数为例。

如上图黄色框框所示, 随着指数(对于个股而言就是股价)的上涨,红色能量柱高度是增加的趋势,当能量柱由增长变成减短的时候,这里是个转折点,意味着上涨趋势有点乏力,有点强弩之末了 ,但也并不是就不会上涨,而是上涨动力变弱甚至是下跌的转折点,当然趋势的力量不是一天就能完毕的,会有个震荡的过程。

然后,还需要一些 关键的心法 ,可以参考利弗莫尔的大作手回忆录(书的名称就叫《股票大作手回忆录》,还有一本叫《操盘术》的,二者内容差不多,有些重复)真正实现多周期MACD一图上下同列 ,楼主有另外一边文章收集个人喜欢的比较认可的一些利弗莫尔的经典语录(请自行查阅),心法也是至关重要, 正确的理念才能指导你正确的操作 ,甚至事半功倍。

通达信MACD箭头指标公式

SHORT:=13;LONG:=28;M:=8;
长短期价差:ema(CLOSE,SHORT)-Ema(CLOSE,LONG);
M日均线:EMA(长短期价差,M);
macd:(长短期价差-M日均线)*2,LINETHICK0;

stICKLINE((MacD > 0),0,MACD,2,0),真正实现多周期MACD一图上下同列 COLOR0000CC;
STICKLINE((MACD > 0),0,MACD*0.9,2,0),COLOR0000EE;
STICKLINE((真正实现多周期MACD一图上下同列 MACD > 0),0,MACD*0.8,2,0),COLOR0011FF;
STICKLINE((MACD > 0),0,MACD*0.7,2,0),COLOR0033FF;
STICKLINE((MACD > 0),0,MACD*0.6,2,0),COLOR0055FF;
STICKLINE((MACD > 0),0,MACD*0.5,2,0),COLOR0077FF;
STICKLINE((MACD > 0),0,MACD*0.4,2,0),COLOR0099FF;
STICKLINE((MACD > 0),0,MACD*0.3,2,真正实现多周期MACD一图上下同列 0),COLOR00BBFF;
STICKLINE((MACD > 0),0,MACD*0.2,2,0),真正实现多周期MACD一图上下同列 COLOR00ddfF;
STICKLINE((MACD > 0),0,MACD*0.1,2,0),COLOR00FFFF;
STICKLINE((真正实现多周期MACD一图上下同列 MACD < 0),0,MACD,2,0),COLORCC0033;
STICKLINE((MACD < 0),0,MACD*0.9,2,0),COLOREE0033;
STICKLINE((MACD < 0),0,MACD*0.8,2,0),COLORFF1133;
STICKLINE((MACD < 0),0,MACD*0.7,2,0),COLORFF3333;
STICKLINE((MACD < 0),0,MACD*0.6,2,0),COLORFF5533;
STICKLINE((MACD < 0),0,MACD*0.5,2,0),COLORFF7733;
STICKLINE((MACD < 0),0,MACD*0.4,2,0),COLORFF9933;
STICKLINE((MACD < 0),0,MACD*0.3,2,0),COLORFFBB33;
STICKLINE((MACD < 0),0,MACD*0.2,2,0),COLORFFDD33;
STICKLINE((MACD < 0),0,MACD*0.1,2,0),COLORFFFF33;
VAR1:=3;
VAR3:=(真正实现多周期MACD一图上下同列 3)*(SMA(((CLOSE - LLV(LOW,27))/(HHV(HIGH,真正实现多周期MACD一图上下同列 真正实现多周期MACD一图上下同列 27) - LLV(LOW,27)))*(100),5,1)) - (2)*(SMA(SMA(((CLOSE - LLV(LOW,27))/(HHV(HIGH,27) - LLV(LOW,27)))*(100),5,1),3,1));
DRAWICON(crOSS(VAR3,VAR1),0,1);

通达信升级版MACD副图指标公式


DIF:=(EMA(CLOSE,12) - EMA(CLOSE,26));
DEA:=EMA(DIF,9);
MACD:(2 * (DIF - DEA)),NODRAW,COLORFF8000;
STICKLINE(MACD0,0,MACD,3,1),COLOR0080FF,LINETHICK2;
STICKLINE(MACD>=REF(MACD,1) AND MACD>0,0,MACD,3,1),COLOR0000FF,LINETHICK2;
STICKLINE(MACD>REF(MACD,1) AND MACD <0,0,MACD,3,1),COLORFF8000,LINETHICK2;
STICKLINE(MACD < 以下是可能出现的变盘点,关注 >
TJ:=MACD>0;
T:=MACD DRAWTEXT(BARSLAST(TJ)=5,0.03,'5'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=8,0.03,'8'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=13,真正实现多周期MACD一图上下同列 0.03,'13'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=21,0.03,'21'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=34,0.03,'34'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=55,0.03,'55'),COLORYELLOW;
DRAWTEXT(BARSLAST(T)=5,-0.03,'5'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=8,-0.03,'8'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=13,-0.03,'13'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=21,-0.03,'21'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=34,-0.03,'34'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=55,-0.03,'55'),COLORGREEN;
ZSJR4:=CROSS(DIF,0);
ZSJR5:=CROSS(0,DIF);
ZSJR6:=BARSLAST(ZSJR4);
ZSJR7:=BARSLAST(ZSJR5);
ZSJR8:=REF(ZSJR4,1);
ZSJR9:=REF(ZSJR5,1);
DIF0:=BARSLAST(ZSJR8);
DIF1:=BARSLAST(ZSJR9);
DIF2:=IF((DIF0 < DIF1),REF(HHV(HIGH,2),DIF0),REF(LLV(LOW,2),DIF1));
DIF3:=(((REF(CLOSE,1) DIF2)) AND (ZSJR6 < ZSJR7));
DIF33:=(((REF(CLOSE,1) >= REF(DIF2,1)) AND (CLOSE < DIF2)) AND (ZSJR7 < ZSJR6));
DIF4:=(DIF3 AND (COUNT(DIF3,ZSJR6) = 1));
DIF5:=(DIF33 AND (COUNT(DIF33,ZSJR7) = 1));
DIF6:=(DIF4 AND (真正实现多周期MACD一图上下同列 REF(BARSLAST(DIF5),1) < REF(BARSLAST(DIF4),1)));
DIF7:=(DIF5 AND (REF(BARSLAST(DIF5),1) > REF(BARSLAST(DIF4),1)));
DIF8:=(DIF4 AND (REF(BARSLAST(真正实现多周期MACD一图上下同列 DIF5),1) > REF(BARSLAST(DIF4),1)));
DIF9:=(DIF5 AND (REF(BARSLAST(DIF5),1) < REF(BARSLAST(DIF4),1)));
BSLINE:=IF((BARSLAST(DIF6) < BARSLAST(DIF7)),IF(REF(CROSS(0,MACD),1),LLV(LOW,2),REF(LLV(LOW,2),BARSLAST(REF(CROSS(0,MACD),1)))),IF(REF(CROSS(MACD,0),1),HHV(HIGH,2),REF(HHV(HIGH,2),BARSLAST(REF(CROSS(MACD,0),1)))));
DEA3:=BARSLAST(CROSS(MACD,0));
DEA5:=BARSLAST(CROSS(0,MACD));
DEA4:=IF((MACD >= 0),HHV(MACD,(DEA3 + 1)),REF(HHV(MACD,(DEA3 + 1)),(DEA5 + 1)));
DEA6:=IF((MACD < 0),LLV(MACD,(DEA5 + 1)),REF(LLV(MACD,(DEA5 + 1)),(DEA3 + 1)));
DEA7:=REF(DEA4,(DEA3 + 1)); 真正实现多周期MACD一图上下同列
DEA8:=REF(DEA6,(DEA5 + 1));
零下金叉:CROSS(DIF,DEA) AND DIF 零上金叉:CROSS(DIF,DEA) AND DIF>=0 AND DIF DRAWICON(零上金叉,DEA,1) ;
DRAWICON(零下金叉,DEA,1) ;
DRAWTEXT_FIX(1,0.52,0,0,'☆微信公众号:(真正实现多周期MACD一图上下同列 程序化指标) ☆'),COLORRED;
JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
二次金叉:CROSS(DIF,DEA) AND DEA

DRAWTEXT(二次金叉,DEA*0.4,'★二金'),COLORYELLOW;
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);

底背:DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,POINTDOT;
DRAWTEXT(底背离,DEA*0.6,'底背离'),COLORRED;
A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
顶背离:=REF(CLOSE,A2+1)DIF AND CROSS(DEA,DIF);
顶背:DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,POINTDOT;
DRAWTEXT(顶背离,DEA*1.3,'顶背离'),COLORGREEN;
DRAWTEXT(零下金叉 AND 二次金叉 AND 底背离,DIF*-1,'★底现★'),COLORFFFFFF;
H1J_19:=HHVBARS(MACD,BARSLAST(MACD <0)+1);
H1J_20:真正实现多周期MACD一图上下同列 =CROSS(BACKSET(CROSS(0,MACD),REF(H1J_19,1)+2),0.5); 真正实现多周期MACD一图上下同列
H1J_22:=DRAWLINE(H1J_20,MACD,REF(H1J_20,1),REF(MACD,1),1);
H1J_23:真正实现多周期MACD一图上下同列 =LLVBARS(MACD,BARSLAST(MACD>0)+1);
H1J_24:=CROSS(BACKSET(CROSS(MACD,0),REF(H1J_23,1)+2),0.5);
H1J_25:=BARSLAST(FILTERX(CROSS(0,MACD),BARSCOUNT(CLOSE)));
H1J_26:=DRAWLINE(H1J_24,MACD,REF(H1J_24,1),REF(MACD,真正实现多周期MACD一图上下同列 1),1);
MACD0:=BACKSET(ISLASTBAR,BARSLAST(H1J_20)+1);
MACD1:=MACD0>REF(MACD0,1);
前1高:REF(MACD,BARSLAST(MACD1)),COLORYELLOW,LINETHICK2;
STICKLINE(MACD>H1J_22,MACD,H1J_22,1,0),COLORYELLOW;
STICKLINE(MACD X_21:=MACD.DIF#WEEK(12,26,9);
X_22:=MACD.DEA#WEEK(12,26,9);
X_23:=MACD.MACD#WEEK(12,26,9);
X_24:=CROSS(X_21,X_22);
0,COLOR00FF00;
IF(X_23>0,0,DRAWNULL),COLOR0000FF;
DRAWTEXT(X_24,DIF/2*-1,'周金叉'),COLORFF00FF;
DRAWTEXT(CROSS(X_22,X_21),DIF/2*-1,'周死叉'),COLORFFFF00;