分析家公式网,提供指标公式,股票软件 用户登录  |  用户 注册

软件名称:[B]MACD共振-2种背离+多空提示[/B]
软件类型:国产软件
运行环境:Win10/Win9X/Win8/Win2000/WinXP/Win2003/Win7/
软件语言:简体中文
授权方式:免费版
软件大小:0 Bytes
官方主页:Home Page
更新时间:2021-02-16 00:15:51
软件简介:

 SJ:=1;

DIFF:EMA(CLOSE,12)-EMA(CLOSE,26);//短周期与长周期的收盘价的指数平滑移动平均值做差。
DEA:EMA(DIFF,9);//DIFF的M个周期指数平滑移动平均
MACD:2*(DIFF-DEA),COLORSTICK;
J:=CROSS(DIFF,DEA);
S:=CROSSDOWN(DIFF,DEA);
JC:=COUNT(J,BARSLAST(CROSS(DIFF>0&&DEA>0,0.5)))=1&&J;
SC:=COUNT(S,BARSLAST(CROSSDOWN(DIFF>0&&DEA>0,0.5)))=1&&S;
JC2:=COUNT(S,BARSLAST(CROSSDOWN(DIFF>0&&DEA>0,0.5)))=2&&S;
SC2:=COUNT(J,BARSLAST(CROSS(DIFF>0&&DEA>0,0.5)))=2&&J;
N1:=SUMBARS(CROSSDOWN(DIFF,DEA),1);
N2:=SUMBARS(CROSS(DIFF,DEA),1);
DRAWTEXT(N2=1&&N1>5&&N1<=13&&EVERY(DIFF>0&&DEA>0 ,N1)&&JC,DIFF,'多'),COLORRED,FONTSIZE16;
//&&DIFF>2
 
M:=SUMBARS((DIFF<0&&CROSSDOWN(DEA,0))||(CROSSDOWN(DIFF,0)&&DEA<0),1);
M1:=SUMBARS(CROSS(DIFF,DEA),1);
M2:=SUMBARS(CROSSDOWN(DIFF,DEA),1);
DRAWTEXT(M2=1&&M1>5&&M1<=13&&EVERY(DIFF<0&&DEA<0,N2) &&SC,DIFF,'空'),COLORGREEN,FONTSIZE16;
 
 
NDTJ:=SUMBARS(N2=1&&N1>5&&N1<=13&&EVERY(DIFF>0&&DEA>0,N1),1);
NKTJ:=SUMBARS(M2=1&&M1>5&&M1<=13&&EVERY(DIFF<0&&DEA<0,N2),1);
//DRAWTEXT(NDTJ<=4&&CROSSDOWN(DIFF,DEA) AND JC2,DIFF,'风险'),COLORRED,FONTSIZE15;
//DRAWTEXT(NKTJ<=4&&CROSS(DIFF,DEA) AND SC2,DIFF,'风险'),COLORGREEN,FONTSIZE15;
 
JC222:=CROSS(DIFF,DEA);
SC222:=CROSSDOWN(DIFF,DEA);
N133:=BARSLAST(JC222)+1;
N233:=BARSLAST(SC222)+1;
HH:=REF(HHV(H,N133),N233);//上次MACD红柱期间合约最大值
HH2:=REF(REF(HH,1),N233);//上上次MACD红柱期间合约最大值
MHD:=VALUEWHEN(SC222,HHV(DIFF,N133));//上次MACD红柱期间DIFF最大值
MHD2:=VALUEWHEN(SC222,REF(MHD,1));//上上次MACD红柱期间DIFF最大值
 
LL:=REF(LLV(L,N233),N133);
LL2:=REF(REF(LL,1),N133);
MLD:=VALUEWHEN(JC222,LLV(DIFF,N233));
MLD2:=VALUEWHEN(JC222,REF(MLD,1));
 
A:=MACD<0&&HH>HH2&&MHD<MHD2;//顶背离
B:=MACD>0&&LL<LL2&&MLD>MLD2;
 
A1:=BACKSET(CROSS(A,0.5),REF(HHVBARS(DIFF,N133),1)+1+1);
A2:=BACKSET(CROSS(A,0.5),REF(HHVBARS(DIFF,N133),SUMBARS(SC222,2))+SUMBARS(SC222,2)+1);
B1:=BACKSET(CROSS(B,0.5),REF(LLVBARS(DIFF,N233),1)+1+1);
B2:=BACKSET(CROSS(B,0.5),REF(LLVBARS(DIFF,N233),SUMBARS(JC222,2))+SUMBARS(JC222,2)+1);
DRAWLINE1(CROSS(A2,0.5),DIFF,CROSS(A1,0.5),DIFF,0),COLORRED,LINETHICK2;
DRAWLINE1(CROSS(B2,0.5),DIFF,CROSS(B1,0.5),DIFF,0),COLORGREEN,LINETHICK2;
 
//DRAWLINE1(CROSS(A2,0.5) AND PERIOD  >=7 ,DIFF,CROSS(A1,0.5),DIFF,0),COLORRED,LINETHICK2;
//DRAWLINE1(CROSS(B2,0.5) AND PERIOD  >=7  ,DIFF,CROSS(B1,0.5),DIFF,0),COLORGREEN,LINETHICK2;
VAR6:=(2*CLOSE+HIGH+LOW)/4;
VAR8:=LLV(LOW,20);
VARAA:=HHV(HIGH,26);
B8:=EMA((VAR6-VAR8)/(VARAA-VAR8)*100,8);
B18:=EMA(B8,5);
K22:=B8>80 AND CROSS(B18,B8);
K1:=BARSLAST(K22);
K2:=REF(K1,1);
K底:=B8<20 AND CROSS(B8,B18);
K底1:=BARSLAST(K底);
K底2:=REF(K底1,1);
DRAWTEXT(REF(B8,1)>80 AND CROSS(B18,B8) AND REF(B8,1)<REF(B8,K2+2) AND REF(C,1)>REF(C,K2+2),MAX(DIFF,DEA),'顶背离'),COLORCYAN,VALIGN0;
//DRAWTEXT(B8<25 AND CROSS(B,B1) AND B8>REF(B,K底2) AND C<REF(C,K底2),MAX(DIFF,DEA),'底背离'),COLORFF00FF,VALIGN0;
DRAWTEXT(B8<25 AND CROSS(B8,B18) AND B8>REF(B8,K底2) AND C<REF(C,K底2),MAX(DIFF,DEA),'底背离'),COLORFF00FF,VALIGN0;
FILLRGN(DIFF>DEA,DIFF,DEA,RGB(87,0,0)); 
FILLRGN(DEA>DIFF,DIFF,DEA,RGB(2,58,1));
 
 

[url=http://www.70822.com/soft/sort013/sort049/down-154218.html]MACD共振-2种背离+多空提示[/url]

关于本站 | 网站帮助 | 广告合作 | 声明 | 友情连接 | 网站地图 |
分析家公式网声明:本站所有股票公式软件资料均网上公开收集,如侵权请联系删帖。站内所有广告,均与本站无关!
Copyright © 2003-2024 70822.Com. All Rights Reserved .
页面执行时间:46.87500 毫秒