当前位置:分析家公式网 → 股票公式 → 同花顺公式 → 一键转帖:背离图型(同花顺公式 副图 源码 测试图)
软件名称:[B]背离图型(同花顺公式 副图 源码 测试图)[/B]
软件类型:国产软件
运行环境:Win10/Win9X/Win8/Win2000/WinXP/Win2003/Win7/
软件语言:简体中文
授权方式:免费版
软件大小:6.00 KB
官方主页:Home Page
更新时间:2021-06-29 00:12:13
软件简介:
DIF:EMA(C,12)-EMA(C,26);DEA:EMA(DIF,9);MACD:(DIF-DEA)*2,NODRAW;ZERO:=0;//{MACD柱线变色标识}STICKLINE(MACD>0ANDMACD>=REF(MACD,1),0,MACD,3,0),colorred;STICKLINE(MACD>0ANDMA... DIF:EMA(C,12)-EMA(C,26);
DEA:EMA(DIF,9);
MACD:(DIF-DEA)*2,NODRAW;
ZERO:=0;
//{MACD柱线变色标识}
STICKLINE(MACD>0 AND MACD>=REF(MACD,1),0,MACD,3,0),colorred;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),0,MACD,3,0),colorliblue;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,3,0),colormagenta;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),0,MACD,3,0),colorligreen;
//{DIF线变色标识}
多:IF(DIF>REF(DIF,1),DIF,DRAWNULL),colorred,LINETHICK2;
空:IF(DIF<REF(DIF,1),DIF,DRAWNULL),colorliblue,LINETHICK1;
//{MACD顶底背离标识.【注】系统提示使用未来函数是背离画线所致.不必害怕搜索}
GJ:=MAX(C,0);
L4:=LLV(GJ,4);
JL:=(HHV(DIF,55)-LLV(DIF,55))/5;
GT:=DEA>REF(DEA,1) AND REF(DEA,1)<REF(DEA,2);
A1:=BARSLAST(REF(GT,1));
底背离:=REF(L4,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND GT,colorred;
DRAWLINE(A1=0,DEA,底背离,REF(DEA,A1),0),colorred,LINETHICK1;
DRAWLINE(底背离,DEA,底背离,REF(DEA,A1),0),colorred,LINETHICK1;
DRAWTEXT(底背离,REF(DEA,A1)*1.18,'底背离'),colorred;
H4:=HHV(GJ,4);
GT2:=DEA<REF(DEA,1) AND REF(DEA,1)>REF(DEA,2);
A2:=BARSLAST(REF(GT2,1));
顶背离:=REF(H4,A2+1)<H4 AND DIF<REF(DIF,A2+1) AND GT2,colorligreen;
DRAWLINE(A2=0,DEA,顶背离,REF(DEA,A2),0),colorligreen,LINETHICK1;
DRAWLINE(顶背离,DEA,顶背离,REF(DEA,A2),0),colorliblue,LINETHICK1;
DRAWTEXT(顶背离,REF(DEA,A2)*1.18,'顶背离'),colorligreen;
//{金叉死叉用符号标识}
A0:=DIF<0 AND DEA<0;
A11:=A0>REF(A0,1);
A3:=BARSLAST(A11);
A4:=COUNT(DEA>0 AND DIF>0,A3)=0;
A5:=CROSS(DIF,DEA);
A6:=BARSLAST(A5);
A7:=REF(A6,A6+1)+A6;
A8:=(DIF+DEA)/2;
A9:=(HIGH+LOW)/2;
A10:=A5 AND A7<A3 AND A4 AND A8>REF(A8,A7) AND A9<REF(A9,A7) AND MACD>0;
DRAWICON(CROSS(DIF,DEA),DIF,7);
DRAWICON(CROSS(DEA,DIF),DIF,8);
JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1,NODRAW;
A51:=BARSLAST(REF(CROSS(DIF,DEA),1));
A52:=BARSLAST(REF(CROSS(DEA,DIF),1));
DRAWTEXT(二次金叉,ZERO-0.10,' 二次金叉'),colormagenta;
//{MACD&KDJ金叉死叉.,共振标识}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9));
K:=SMA(RSV,9,3),NODRAW;
D:=SMA(K,9,3),NODRAW;
J:=3*K-2*D,NODRAW;
A:=CROSS(DIF,DEA) AND CROSS(K,D) AND CROSS(J,D);
DRAWICON(A,DEA*1.0,11);
DRAWTEXT(A,DEA*1.0,'金叉.,共振'),colormagenta;
B:=CROSS(DEA,DIF) AND CROSS(D,K) AND CROSS(D,J);
DRAWICON(B,DEA*1.0,12);
DRAWTEXT(B,DEA*1.0,'死叉.,共振'),colorligreen;
//{MACD二次启动信号标识}
JLTS:=BARSLAST(CROSS(DEA,0));
MZJG:=CROSS(DIF,DEA) AND EVERY(DEA>0,JLTS) AND COUNT(CROSS(DIF,DEA),JLTS)=1 AND COUNT(CROSS(DEA,DIF),8)=1;
DRAWICON(MZJG,ZERO,1);
DRAWTEXT(MZJG,ZERO-0.05,'涨'),colormagenta;
[url=http://www.70822.com/soft/sort013/sort036/down-156690.html]背离图型(同花顺公式 副图 源码 测试图)[/url]