MACD公式大全.docx
《MACD公式大全.docx》由会员分享,可在线阅读,更多相关《MACD公式大全.docx(53页珍藏版)》请在冰豆网上搜索。
MACD公式大全
以下公式适合通信达和招商牛网等股票软件。
选出股票后能否买入依然还要综合参考大趋势和其它指标.
金叉并非万能,有时刚刚进入金叉或准金叉状态,也可能是上一波反弹的结束,下一波下跌的开始.
只有当金叉周期的前后周期均为上涨趋势,金叉的威力才最大.
业绩的持续增长才是技术指标的前提和保证。
1、0轴上方第一次金叉选股公式:
DIFF:
=EMA(CLOSE,12)—EMA(CLOSE,26);DEA :
=EMA(DIFF,9);MACD:
=2*(DIFF—DEA);select:
cross(diff,dea)anddea〉-1.0anddea<0。
5andCLOSE〉ref(CLOSE,1)andCLOSE>=ma(c,60);
或:
DIF:
=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:
=EMA(DIF,9);XG:
DIF>0ANDDEA>0ANDCROSS(DIF,DEA);
2、0轴上方二次金叉的选股公式:
JC:
IF(SUM(IF(MACD〉0ANDCROSS(MACD。
DIF,MACD.DEA),1,0),0)—HHV(IF(IF(CROSS(MACD.DEA,0),1,0),SUM(IF(MACD〉0ANDCROSS(MACD。
DIF,MACD.DEA),1,0),0),0),0)=2ANDSUM(IF(MACD>0ANDCROSS(MACD.DIF,MACD.DEA),1,0),0)〉REF(SUM(IF(MACD>0ANDCROSS(MACD。
DIF,MACD.DEA),1,0),0),1),10,0);
3.0轴下方一次金叉的选股公式:
DIFF:
=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:
=EMA(DIFF,9),COLORFFFF00;
MACD:
=(DIFF—DEA)*2;
低位金叉:
CROSS(DIFF,DEA)ANDDIFF〈-0.1;
4、0轴下方二次金叉且第二次金叉高于第一次金叉:
DIF:
=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:
=EMA(DIF,9);
AA:
=BARSLAST(REF(CROSS(DIF,DEA),1));
二次金叉:
CROSS(DIF,DEA)ANDDIF〉REF(DIF,AA+1)ANDAA〈20ANDDIF<0;
5、0轴下方二次金叉选股公式:
DIFF:
=EMA(CLOSE,12)-EMA(CLOSE,26);{选股设JC=10即可}
DEA:
=EMA(DIFF,9);
MACD:
=2*(DIFF—DEA),COLORSTICK;
A:
=IF(CROSS(0,DEA),1,0);
A1:
=IF(DIFF<0ANDCROSS(DIFF,DEA),1,0);
SS:
=IF(A,SUM(A1,0),0);
SSB:
=HHV(SS,0);
SSS:
=SUM(A1,0);
JC:
IF(SSS-SSB=2ANDSSS>REF(SSS,1),10,0);
6、缩量横盘突破选股:
WH01:
=(HHV(C,10)—LLV(C,10))/LLV(C,10)*100〈=10;
WH02:
=SUM(VOL,10)/CAPITAL*100<45;
WH03:
=REF(WH01,1);
WH04:
=HHVBARS(HIGH,55)〉20ORC=HHV(H,55);
WH05:
=WH02ANDWH03ANDWH04ANDC>REF(HHV(H,10),1);
WH05ANDREF(NOT(WH05),1);
7、均线、KDJ、MACD金叉的预警选股公式
完全符合以下条件:
1、5日线上穿10日线
2、MACD金叉
3、KDJ金叉(KDJ数值由9、3、3调整为9、9、9)
4、成交量指标金叉
通达信预警选股公式
A1:
=CROSS(MA(C,5),MA(C,10));
A2:
=CROSS(”MACD。
DIF",”MACD。
DEA”);
A3:
=CROSS(”KDJ.K”(9,9,9),”KDJ.D”(9,9,9));
A4:
=CROSS(MA(V,5),MA(V,10));
XG:
A1ANDA2ANDA3AND4;
三金叉选股完整源码,绝无未来函数
均线、成交量、MACD同时金叉
MA1:
=MA(CLOSE,5);
MA2:
=MA(CLOSE,10);
AA:
=CROSS(MA1,MA2);
AAA:
=COUNT(AA,3)〉=1;
T1:
=MA(VOL,5);
T2:
=MA(VOL,10);
BB:
=CROSS(T1,T2);
BBB:
=COUNT(BB,3)>=1;
DIF:
=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:
=EMA(DIF,9);
MACD:
=(DIF-DEA)*2;
CC:
=CROSS(DIF,DEA);
CCC:
=COUNT(CC,3)〉=1;
三金:
=AAAANDBBBANDCCC;
三金叉:
FILTER(三金,3),COLORFF00FF;
使用说明:
该选股公式适合超级短线,快进快出具有一定的风险因素,此时的股价往往处于拉高拔升阶段.要求使用者特别关注股价所处的位置,如果过于高位防止庄家诱多。
低位可大胆搏杀,短期回档被套也有回旋余地。
-—-—--——-—-——————--—-——--—-——---—-——--—--————--———————-—-—-———----
6、四线粘合
N1:
=5;N2:
=10;N3:
=20;M:
=1;
MA1:
=MA(C,N1);MA2:
=MA(C,N2);MA3:
=MA(C,N3);
A3:
=V>REF(V,1)*1.5ANDV〉MA(V,5);
MAX(MA1,MAX(MA2,MA3))/MIN(MA1,MIN(MA2,MA3))〈1+0。
01*M
ANDC>OANDV〉REF(V,1)ANDFINANCE(7)<=300000000
ANDA3ANDCAPITAL<=300000000;
7、均线粘合
M:
=1;
M5:
=MA(CLOSE,5);
M10:
=MA(CLOSE,10);
M20:
=MA(CLOSE,20);
K1:
=MAX(MAX(M5,M10),MAX(M10,M20));
K2:
=MIN(MIN(M5,M10),MIN(M10,M20));
A:
=MAX(M5,MAX(M10,M20))/MIN(M5,MIN(M10,M20))〈1+0。
01*M;
A1:
=(K1/K2—1)<0。
005;
A2:
=(K1/K2—1)〈0。
005;
A3:
=V〉REF(V,1)*1。
5ANDV〉MA(V,5);
XG:
AANDA1ANDA2ANDA3;
8、多线粘合
V0:
=EMA(C,5);
V1:
=EMA(C,10);
V2:
=EMA(C,15);
V3:
=EMA(C,30);
V4:
=EMA(C,60);
M1:
=1000*V1/V4〈=1015AND1000*V1/V4>=975;
M2:
=1000*V2/V4<=1020AND1000*V2/V4〉=980;
M3:
=1000*V3/V4<=1015AND1000*V3/V4〉=985;
M4:
=M1ANDM2ANDM3ANDCROSS(V0,V1);
M5:
=M1ANDM2ANDM3ANDCROSS(V0,V3);
M4ORM5;
9、MACD天天挣钱选股指标公式
DIFF:
=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:
=EMA(DIFF,9);
XG:
CROSS(REF(DEA,1),REF(DIFF,1))ANDCROSS(DIFF,DEA);
10、短线之王
VAR1:
=(-100)*(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3));
CROSS(VAR1,-87)ANDOPEN0。
98*REF(INDEXC,1)ANDCLOSE<=1.47*LLV
(CLOSE,58);
-—-——-———-——-—--———--——--———-—--——-—-————————-——----—-—-——--——-——————
以上公式经过验证有效!
下面公式有待验证。
—-—-—-——-——----——-———-——--—-—-—-———-----———————---—————---———————--——
【通达信】超准MACD(低位金叉、顶背离、零下二次金叉)-指标公式源码
SQX:
=(C-MA(CLOSE,13))*100;
DIFF:
EMA(MA(SQX,7),1),COLORWHITE;
DEA:
EMA(DIFF,7),COLORYELLOW;
MACD:
(DIFF—DEA)*2,COLORSTICK;
低位金叉:
IF(CROSS(DIFF,DEA)ANDDIFF〈-0.1,15,DRAWNULL),COLORYELLOW,LINETHICK4,CROSSDOT;
JCCOUNT:
=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA〉=0));
二次金叉:
IF(CROSS(DIFF,DEA)ANDDEA<0ANDCOUNT(JCCOUNT=2,21)=1,28,DRAWNULL),COLORFF00FF,LINETHICK4,CROSSDOT;
A1:
=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:
IF(REF(CLOSE,A1+1)〉CLOSEANDDIFF>REF(DIFF,A1+1)ANDCROSS(DIFF,DEA),40,DRAWNULL),COLORRED,LINETHICK4,CROSSDOT;
势:
DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORGREEN;{,COLORRED;}
A2:
=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:
=REF(CLOSE,A2+1)〈CLOSEANDREF(DIFF,A2+1)>DIFFANDCROSS(DEA,DIFF),COLORWHITE;
顶背离_:
IF(REF(CLOSE,A2+1)〈CLOSEANDREF(DIFF,A2+1)〉DIFF
ANDCROSS(DEA,DIFF),66,DRAWNULL)
,COLORF08000,LINETHICK4,CROSSDOT;
压:
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORFFBB99;
A3:
=CROSS(DIFF,DEA)ANDDEA<0;
--—---——---————--—----—-———-————-—-—-———-——-—------—----——-----——-———--
五线顺上第一阳绝杀(主图+选股)
{5日、10日、20日、60日、120日均线分别代表周线、半月线、月线、季线和半年线,是广通短银股技的灵魂和骨架,统称五线,五线顺则炒股顺,五线不顺则炒股不顺;五线顺上,则后市必涨;五线顺上,顶紧右上,不追高追涨;会创新高,还有新高,直到不创新高,这是我们绝杀涨停板和快速获利的不二法门
MA5:
=MA(C,5);
MA10:
=MA(C,10);
MA20:
=MA(C,20);
MA60:
=MA(C,60);
MA120:
=MA(C,120);
∠5:
=57。
3*(ATAN(100*(MA5/REF(MA5,1)—1)));
∠10:
=57。
3*(ATAN(100*(MA10/REF(MA10,1)—1)));
∠20:
=57.3*(ATAN(100*(MA20/REF(MA20,1)—1)));
∠60:
=57.3*(ATAN(100*(MA60/REF(MA60,1)-1)));
∠120:
=57.3*(ATAN(100*(MA120/REF(MA120,1)—1)));
C1:
=REF(C,1);
C2:
=REF(C,2);
WS1:
=MA5>MA10&&MA10〉MA20&&MA20〉MA60&&MA60〉MA120;
WS2:
=∠5>0&&∠10〉0&&∠20>0&&∠60>0&&∠120>0;
WXSS:
=COUNT(WS1,2)=2&&COUNT(WS2,2)=2;
WSYY:
=C>MA5&&C>C1&&C〉O&&WXSS&&C1〈MIN(REF(MA5,1),REF(MA10,1));
DRAWTEXT(WSYY,H*1.06,五上一阳),COLORLIGRAY;
DRAWBAND(MA60,RGB(240,180,180),MA120,RGB(180,240,180));
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
STICKLINE(WSYY,CLOSE,OPEN,2,0),COLORYELLOW;
M1:
MA5;
M2:
MA10;
M3:
MA20;
M4:
MA60;
M5:
MA120;
-——--—-———-—-——-----—--——-—-—-————-——--—--——---———-——-—--—--——--—--
kdj三金叉+macd二次金叉+均线多头排列的选股公式
{kdj三金叉}
MA5:
=EMA(C,5);
MA10:
=EMA(C,10);
MV5:
=EMA(V,5);
MV10:
=EMA(V,10);
K:
=”KDJ.K”(9,3,3);
D:
="KDJ.D”(9,3,3);
V1:
=MA5>REF(MA5,1)ANDMA10〉REF(MA10,1)ANDC>REF(C,1)ANDC/O〉1.01;
VV1:
=MV5〉REF(MV5,1)ANDMV10>=REF(MV10,1)ANDV〉REF(V,1)*1。
2;
KD1:
=K>REF(K,1)ANDD>=REF(D,1);
VA:
=COUNT(CROSS(K,D),4)〉=1ANDCOUNT(CROSS(MA5,MA10),4)〉=1AND
COUNT(CROSS(MV5,MV10),4)>=1;
{macd二次金叉}
DIF:
=EMA(CLOSE,12)—EMA(CLOSE,26);
DEA:
=EMA(DIF,9);
MACD:
=2*(DIF—DEA);
A1:
=CROSS(DIF,DEA);
A2:
=REF(A1,1);
A3:
=COUNT(A2,21);{今天之前3个星期以来曾经金叉}
A4:
=MA(C,5)>=MA(C,10)ANDMA(C,10)〉=MA(C,30)ANDMA(C,30)〉=MA(C,60)
ANDMA(C,60)〉=MA(C,120)ANDMA(C,120)〉=MA(C,250);
{均线多头排列}
{去S、T、停牌}
ST:
=STRFIND(stkname,’ST',1)>0;
S:
=STRFIND(stkname,'S’,1)>0;
停牌:
=(DYNAINFO(4)=0);
选股:
IF(V1ANDVV1ANDKD1ANDVA,1,0)andA1ANDA3ANDA4andnot(ST)andnot(停牌)andnot(S);
——-—-----—-————---————-———-—--———---—-——---——-————-———--—-——-————-———-
macd在0轴上第一次金叉选股公式
要看趋势后看金叉才行呀,只看金叉是很危险的.
二级
DIFF:
=EMA(CLOSE,12)-EMA(CLOSE,26);DEA :
=EMA(DIFF,9);MACD:
=2*(DIFF—DEA);select:
cross(diff,dea)anddea〉—1。
0anddea〈0.5andCLOSE>ref(CLOSE,1)andCLOSE>=ma(c,60);
复制粘贴以上内容后就可选股
一级
选股不如选时,当做则做,该休息就得休息。
再好的选股公式,都是在选过去,未来是要靠自己选的。
祝您能早日悟出来
三级
DIF:
=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:
=EMA(DIF,9);MACD:
=(DIF—DEA)*2,COLORSTICK;xg:
MACD>0ANDCROSS(DIF,DEA);
---———-----—-------—--—--——-———-——-—--—-—-———————-——-——-----——-—--—-———
通达信选股公式
因为有不少朋友一直在用通达信软件,对于本人使用的同花顺公式有用不了的情况,因此特针对通达信软件里面的一些比较实用的主图副图公式进行了研究,并编写出选股公式,供大家参考。
低位金叉选股
DIFF:
=EMA(DCLOSE,12)-EMA(DCLOSE,26);
DEA:
=EMA(DIFF,9);
MACD:
=(DIFF-DEA)*2;
低位金叉:
CROSS(DIFF,DEA)ANDDIFF〈—0。
1;
二次金叉选股
DIFF:
=EMA(DCLOSE,12)—EMA(DCLOSE,26);
DEA:
=EMA(DIFF,9);
MACD:
=(DIFF—DEA)*2;
JCCOUNT:
=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:
CROSS(DIFF,DEA)ANDDEA<0ANDCOUNT(JCCOUNT=2,21)=1;
绝地反弹
(1)
VAR1:
=REF(LOW,1);
VAR2:
=SMA(ABS(LOW—VAR1),13,1)/SMA(MAX(LOW-VAR1,0),13,1)*100;
VAR3:
=EMA(IF(CLOSE*1.2,VAR2*13,VAR2/13),13);
VAR4:
=LLV(LOW,34);
VAR5:
=HHV(VAR3,34);
VAR6:
=IF(LLV(LOW,55),1,0);
VAR7:
=EMA(IF(LOW<=VAR4,(VAR3+VAR5*2)/2,0),3)/618*VAR6;
XL1:
=MA(LOW,2)*0。
96;
XL2:
=MA(LOW,26)*0.85;
XL3:
=REF(XL1,1)〈XL2ANDREF(XL1,1)〈XL1ANDREF(XL1,1)〈REF(XL1,2);
启动:
=IF(XL3,0,VAR7*3),COLORRED;
XG:
启动>25;
(2)
BACKSET((REF(CLOSE,1)〈REF(OPEN,1)AND
CLOSE〉OPENANDABS(CLOSE—REF(CLOSE,1))/CLOSE〈0。
002),2);
A2:
=FILTER(A1<=V3,10);
NDCAPITAL〈300000000
REF(V,1)=LLV(V,4)ANDV>=REF(V,1)
HHV(V,3)=REF(V,1)ANDHHV(V,5)=REF(V,1)ANDHHV(V,21)=REF(V,1)
ANDV>=REF(V,1)
01>0ANDT02〉0;
1.三线粘合
M:
=1;
M5:
=MA(CLOSE,5);
M10:
=MA(CLOSE,10);
M20:
=MA(CLOSE,20);
K1:
=MAX(MAX(M5,M10),MAX(M10,M20));
K2:
=MIN(MIN(M5,M10),MIN(M10,M20));
A:
=MAX(M5,MAX(M10,M20))/MIN(M5,MIN(M10,M20))<1+0.03*M;
A1:
=(K1/K2-1)<0。
005;
A2:
=(K1/K2—1)<0。
005;
A3:
=V>REF(V,1)*1.5ANDV>MA(V,5);
XG:
AANDA1ANDA2ANDA3ANDC>OANDV〉REF(V,1)ANDCAPITAL〈=300000000;
2.三条线粘合
N1:
=5;N2:
=10;N3:
=20;M:
=1;
MA1:
=MA(C,N1);MA2:
=MA(C,N2);MA3:
=MA(C,N3);
A3:
=V〉REF(V,1)*1.5ANDV>MA(V,5);
MAX(MA1,MAX(MA2,MA3))/MIN(MA1,MIN(MA2,MA3))〈1+0.01*M
ANDC>OANDV〉REF(V,1)ANDFINANCE(7)〈=300000000
ANDA3ANDCAPITAL〈=300000000;
3.均线粘合
M:
=1;
M5:
=MA(CLOSE,5);
M10:
=MA(CLOSE,10);
M20:
=MA(CLOSE,20);
K1:
=MAX(MAX(M5,M10),MAX(M10,M20));
K2:
=MIN(MIN(M5,M10),MIN(M10,M20));
A:
=MAX(M5,MAX(M10,M20))/MIN(M5,MIN(M10,M20))<1+0。
01*M;
A1:
=(K1/K2—1)〈0。
005;
A2:
=(K1/K2-1)〈0.005;
A3:
=V〉REF(V,1)*1。
5ANDV〉MA(V,5);
XG:
AANDA1ANDA2ANDA3;
3。
金叉选股指标
快线:
=EMA(EMA(EMA(EMA(CLOSE,2),2),2),2);
慢线:
=EMA(REF(快线,1),2);
A3:
=V>REF(V,1)*1。
5ANDV〉MA(V,5);
XG:
CROSS(快线,慢线)ANDC>OAND
V〉=MA(V,21)ANDV〉REF(V,1)ANDCAPITAL〈=300000000;
4.角度
MA5:
=MA(C,5);
MA10:
=MA(C,10);
MA20:
=MA(C,20);
V0:
CROSS(MA5,MA10)ANDCROSS(MA10,MA20)AND
CROSS(MA5,MA20);
IF(角度MA3>45AND角度MA5〉40AND角度MA10>10
AND角度MA20>20ANDMA(C,135)〉REF(MA(C,135),1),
1,0),COLOR00FF00
1.聚宝盆
DIFF:
=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:
=EMA(DIFF,M);
MACD2:
=2*(DIFF-DEA);
HHV(MACD2,4)<0ANDMACD2>REF(MACD2,1)ANDREF(MACD2,1)〈REF(MACD2,2)ANDREF(MACD2,2)〈REF
(MACD2,3);
2.强势股
{SJXXG四均线选股}
MA3:
=MA(C,3);
MA5:
=MA(C,5);
MA10:
=MA(C,10);
MA20:
=MA(C,20);
V0:
=MA(C,3)>REF