当前位置:分析家公式网 → 股票公式 → 同花顺公式 → 一键转帖:神手背离,MACD多指背离(同花顺公式 副图 源码 测试图)
软件名称:[B]神手背离,MACD多指背离(同花顺公式 副图 源码 测试图)[/B]
软件类型:国产软件
运行环境:Win10/Win9X/Win8/Win2000/WinXP/Win2003/Win7/
软件语言:简体中文
授权方式:免费版
软件大小:0 Bytes
官方主页:Home Page
更新时间:2021-02-08 00:12:37
软件简介:
LC:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);
RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;
RSI3:=SMA(MAX(CLOSE-LC,0),24,1)/SMA(ABS(CLOSE-LC),24,1)*100;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9));
K:=SMA(RSV,9,3);
D:=SMA(K,9,3);
J:=3*K-2*D;
DIF:=EMA(CLOSE,5)-EMA(CLOSE,26);
DEA:=EMA(DIF,50);
MACD:2*(DIF-DEA);
FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
K1:=MACD<=REF(MACD,1) AND MACD>0;
K2:=MACD>=REF(MACD,1) AND MACD<0;
K3:=CROSS(FF,MA15);
K4:=CROSS(88,RSI);
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,3,0),colorred;
STICKLINE(K1,0,MACD,3,0),colorcyan;
STICKLINE(MACD<REF(MACD,1) AND MACD<0,0,MACD,3,0),colorcyan;
STICKLINE(K2,0,MACD,3,0),colormagenta;
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
B1:=REF(C,A1+1)>C AND REF(DIF,A1+1)<DIF AND CROSS(DIF,DEA);
A2:=BARSLAST(REF(CROSS(K,D),1));
B2:=REF(C,A2+1)>C AND REF(K,A2+1)<K AND CROSS(K,D);
A3:=BARSLAST(REF(CROSS(RSI1,RSI2),1));
B3:=REF(C,A3+1)>C AND REF(RSI1,A3+1)<RSI1 AND CROSS(RSI1,RSI2);
C1:=BARSLAST(REF(CROSS(DEA,DIF),1));
D1:=REF(C,C1+1)<C AND REF(DIF,C1+1)>DIF AND CROSS(DEA,DIF);
C2:=BARSLAST(REF(CROSS(D,K),1));
D2:=REF(C,C2+1)<C AND REF(K,C2+1)>K AND CROSS(D,K);
C3:=BARSLAST(REF(CROSS(RSI2,RSI1),1));
D3:=REF(C,C3+1)<C AND REF(RSI1,C3+1)>RSI1 AND CROSS(RSI2,RSI1);
低位金叉:=CROSS(DIF,DEA) AND DIF<-0.1;
STICKLINE(低位金叉,0,MACD,4,0),coloryellow;
DRAWTEXT(低位金叉,MACD,' 低位金叉'),colorred;
DRAWTEXT(B1>0,MACD,'MACD底背'),colorred;
STICKLINE(B1>0,0,MACD,4,0),coloryellow;
DRAWTEXT(B2>0,MACD*0.9,'KDJ底背'),colorred;
STICKLINE(B2>0,0,MACD,4,0),coloryellow;
DRAWTEXT(B3>0,MACD*1.1,'RSI底背'),colorred;
STICKLINE(B3>0,0,MACD,4,0),coloryellow;
DRAWTEXT(D1>0,MACD,'MACD顶背'),colorgreen;
STICKLINE(D1>0,0,MACD,4,0),colorgreen;
DRAWTEXT(D2>0,MACD*0.9,'KDJ顶背'),colorgreen;
STICKLINE(D2>0,0,MACD,4,0),colorgreen;
DRAWTEXT(D3>0,MACD*1.1,'RSI顶背'),colorgreen;
STICKLINE(D3>0,0,MACD,4,0),colorgreen;
DRAWTEXT(K3 AND K2,IF(MACD>0,0,MACD),'底背'),coloryellow;
DRAWTEXT(K4 AND K1,IF(MACD>0,MACD,0),'顶背'),colorgreen;
DRAWTEXT(K3 AND K2!=1,IF(MACD>0,0,MACD),'预底'),coloryellow;
DRAWTEXT(K4 AND K1!=1,IF(MACD>0,MACD,0),'预顶'),colorgreen;
DRAWICON(K3 AND K2,MACDFS,1);
DRAWICON(K4 AND K1,MACDFS,2);
DRAWICON(K4,IF(MACD>0,MACD,0),39);
DRAWICON(K3,IF(MACD>0,0,MACD),38);
STICKLINE(K3 AND K2!=1,0,MACD,4,0),colormagenta;
STICKLINE(K4 AND K1!=1,0,MACD,4,0),colorgreen;
STICKLINE(K3 AND K2,0,MACD,4,0),coloryellow;
STICKLINE(K4 AND K1,0,MACD,4,0),colorgreen;
SHORT:=6;//分析家公式网 www.70822.com
LONG:=13;
MID:=4;
DIFJ:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEAJ:=EMA(DIFJ,MID);
MACDK:=(DIFJ-DEAJ)*2;
MACDJC:=CROSS(DIFJ,DEAJ);
NK:=9;
MKS1:=3;
MK2:=3;
RSV1:=(CLOSE-LLV(LOW,NK))/(HHV(HIGH,NK)-LLV(LOW,NK))*100;
KS1:=SMA(RSV1,MKS1,1);
DS1:=SMA(KS1,MK2,1);
JS1:=3*KS1-2*DS1;
KDJC:=CROSS(KS1,DS1);
NN1:=5;
NN2:=10;
NN3:=20;
NN4:=30;
BBI:=(MA(CLOSE,NN1)+MA(CLOSE,NN2)+MA(CLOSE,NN3)+MA(CLOSE,NN4))/4;
BBIJC:=CROSS(C,BBI),colorred;
N5:=6;
LCK:=REF(CLOSE,1);
AAS:=ABS(HIGH-LCK);
BB:=ABS(LOW-LCK);
CCK:=ABS(HIGH-REF(LOW,1));
DDK:=ABS(LCK-REF(OPEN,1));
R:=IF(AAS>BB AND AAS>CCK,AAS+BB/2+DDK/4,IF(BB>CCK AND BB>AAS,BB+AAS/2+DDK/4,CCK+DDK/4));
X:=(CLOSE-LCK+(CLOSE-OPEN)/2+LCK-REF(OPEN,1));
SI:=16*X/R*MAX(AAS,BB);
ASI:=SUM(SI,0);
MASI:=SUM(ASI,6);
ASIJC:=CROSS(ASI,MASI),colorblue;
MTM:=CLOSE-REF(CLOSE,12);
MTMJC:=CROSS(MTM,0),colorbrown;
四指标共振:=MACDJC+KDJC+BBIJC+ASIJC+MTMJC=4;
五指标共振:=MACDJC+KDJC+BBIJC+ASIJC+MTMJC=5;
STICKLINE(四指标共振,0,MACD,4,0),colorblue;
STICKLINE(四指标共振,0,MACD/2,4,0),coloryellow;
STICKLINE(五指标共振,0,MACD,4,0),colorred;
STICKLINE(五指标共振,0,MACD/3,4,0),colorwhite;
STICKLINE(五指标共振,0,MACD/5,4,0),colorblue;
DRAWTEXT(四指标共振,MACD,'买'),coloryellow;
DRAWTEXT(五指标共振,MACD,'必买'),colorred;
底背:=SUM(低位金叉+B1+B2+B3,5)>=3;
DRAWTEXT_FIX(ISLASTBAR,0.02,0.06,0,'咨询+224028499'),COLORFF00FF;
[url=http://www.70822.com/soft/sort013/sort036/down-154024.html]神手背离,MACD多指背离(同花顺公式 副图 源码 测试图)[/url]