导航:首页 > 源码编译 > macd背离源码

macd背离源码

发布时间:2024-03-05 12:15:12

⑴ 求股票公式:macd背离选股公式

MACD底背离选股公式——通达信、同花顺 {底背离,通达信版、同花顺版}
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
QZQ:=BARSLAST(REF(MACD,1)<0 ANDMACD>0);
QM:=LLVBARS(MACD,QZQ+20);
MQDZ:=IF(QM>QZQ,REF(MACD,QM),0);
XG1:=MACD<0 AND MACD>MQDZ
AND CLOSE=LLV(CLOSE,QZQ+20) ANDMQDZ<0;
XG:REF(XG1,1)=1 AND MACD>REF(MACD,1);

{双底背离,通达信版、同花顺版}
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
QZQ:=BARSLAST(REF(MACD,1)<0 ANDMACD>0);
QM:=LLVBARS(MACD,QZQ+20);
MQDZ:=IF(QM>QZQ,REF(MACD,QM),0);
QF:=LLVBARS(DIFF,QZQ+20);
DQDZ:=IF(QF>QZQ,REF(DIFF,QF),0);

XG1:=MACD<0 AND MACD>MQDZ ANDDIFF<0 AND DIFF>DQDZ
AND CLOSE=LLV(CLOSE,QZQ+20) ANDMQDZ<0 AND DQDZ<0;
XG:REF(XG1,1)=1 AND MACD>REF(MACD,1);

注:底双背离是指MACD(绿柱)和DIFF(黄白线)都底背离。

⑵ 求通达信15分钟周期MACD底背离的选股公式

用日线的底岁首轿背离公乎肆式,选择15分钟周期就芹闭可以了。

下图是macd底背离选股指标日线胜率回测截图

⑶ 请高手编写个通达信的简单公式:MACD红绿柱子背离

MACD顶底背离(同时包含KDJ背离,RSI背离)
公式如下:

DIFF:EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:EMA(DIFF,9);
MACD:2*(DIFF-DEA),COLORSTICK;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);
A2:=BARSLAST(REF(CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3)),1));
B2:=REF(C,A2+1)>C AND REF("KDJ.K"(9,3,3),A2+1)<"KDJ.K"(9,3,3) AND CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));
A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));
B3:=REF(C,A3+1)>C AND REF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));
C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));
D1:=REF(C,C1+1)<C AND REF(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF);
C2:=BARSLAST(REF(CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3)),1));
D2:=REF(C,C2+1)<C AND REF("KDJ.K"(9,3,3),C2+1)>"KDJ.K"(9,3,3) AND CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3));
C3:=BARSLAST(REF(CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24)),1));
D3:=REF(C,C3+1)<C AND REF("RSI.RSI1"(6,12,24),C3+1)>"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24));
MACD底背:IF(B1>0,-0.1,0),COLORRED,POINTDOT;
KDJ底背:IF(B2>0,-0.1,0),COLORFF00FF,POINTDOT;
RSI底背:IF(B3>0,-0.1,0),COLORYELLOW,POINTDOT;
MACD顶背:IF(D1>0,0.1,0),COLOR00FF00,POINTDOT;
KDJ顶背:IF(D2>0,0.1,0),COLORFFCC66,POINTDOT;
RSI顶背:IF(D3>0,0.1,0),COLORWHITE,POINTDOT;
STICKLINE(B1>0,-0.1,0,2,0),COLORRED;
STICKLINE(B2>0,-0.1,0,2,0),COLORFF00FF;
STICKLINE(B3>0,-0.1,0,2,0),COLORYELLOW;
STICKLINE(D1>0,0.1,0,2,0),COLOR00FF00;
STICKLINE(D2>0,0.1,0,2,0),COLORFFCC66;
STICKLINE(D3>0,0.1,0,2,0),COLORWHITE;

阅读全文

与macd背离源码相关的资料

热点内容
drc文件delphi编译 浏览:941
魔兽世界广西服务器地址 浏览:309
android编译源码命令 浏览:407
朗行压缩机维修 浏览:418
单片机比例运算电路 浏览:53
程序员改方案亮刀枪 浏览:136
无源资源码化的作用 浏览:999
java内存编译 浏览:163
福建节能环保无油螺杆压缩机型号 浏览:527
美国纽约摄影学院pdf 浏览:952
如何把网页代码上传到服务器上 浏览:660
清理笔记本电脑灰尘解压视频 浏览:208
夜蒲聚会app是什么软件 浏览:643
任天堂如何区分服务器 浏览:820
云服务器的运用前景 浏览:549
解压视频素材哪里有 浏览:257
小米5android7 浏览:844
极品飞车10修改直接解压 浏览:642
简易算法怎么用 浏览:499
压缩比101用什么油 浏览:562