网站首页 > 飞狐公式 正文
飞狐MACD转折价位指标公式
input: P(19,15,100), S(7,5,140), M(9,2,80);
{-----------------------☆功能开关------------------------}
{资金}
ZJ1:=DMA((H+L+C*2)/4,0.9); ZJ2:=V/((H-L)*2-ABS(C-O));
ZJ3:=IF(C>O,ZJ2*(H-L),IF(CO,0-ZJ2*(H-C+(O-L)),IF(C
ZJ4:=ZJ3/20/1.15; ZJ5:=ZJ4*0.55+REF(ZJ4,1)*0.33+REF(ZJ4,2)*0.22; ZJ6:=EMA(ZJ5,3);
{macd}
MJ_1 := EMA(CLOSE,S) - EMA(CLOSE,P);
MJ_2 := EMA(MJ_1,M);
MJ_3 := 2*(MJ_1-MJ_2);
MJ_4:=REVERSE(MJ_3)+2*WMA(WMA(MJ_3,1),5);
MJ_5:=3*MJ_4-2*SMA(MJ_4,2,1);
{形态}
低金:=CROSS(MJ_1,MJ_2) AND MJ_1<-0.1;{低金}
SA0:=COUNT(CROSS(MJ_1,MJ_2) AND MJ_2<0,21)=3;
零下二次金叉:=CROSS(MJ_3,0) and SA0;{零下二次金叉}
SA1:=COUNT(CROSS(MJ_1,MJ_2),BARSLAST(MJ_2>=0));
二金:=(CROSS(MJ_1,MJ_2) AND MJ_2<0 AND COUNT(SA1=2,21)=1)*2;{二次金叉}
SA2:=BARSLAST(REF(CROSS(MJ_1,MJ_2),1));
底背:=(REF(C,SA2+1)>C AND MJ_1>REF(MJ_1,SA2+1) AND CROSS(MJ_1,MJ_2))*3;{底背}
三全:=低金 AND 二金 AND 底背;
SA3:=BARSLAST(REF(CROSS(MJ_2,MJ_1),1));
顶背:=REF(C,SA3+1)MJ_1 AND CROSS(MJ_2,MJ_1);{顶背}
{信号}
M_C1:=EMA(C,5)/EMA(EMA(C,9),16)<=0.85 and c/ref(c,1)<1.05 and c/ref(c,1)>0.905 and V/CAPITAL*100<5;
M_C2:=MIN(ref(C,2)*0.865,ref(c,13)*0.772); M_C3:=(C-M_C2)/C<0.03; 满仓:=M_C1 and M_C3;
{估测转折股价--未来}
X:=BarsLast(Backset(ISLASTBAR,1)=1)+1;
Z_1:=REF(MJ_2,1)+((M+1)/(2*(M-1)))*REF(MJ_3,1);
Z_2:=((P-1)*(S+1)*REF(EMA(C,P),1)-(P+1)*(S-1)*REF(EMA(C,S),1)+(S+1)*(P+1)*REF(MJ_1,1))/(2*P-2*S);
Z_3:=((P-1)*(S+1)*REF(EMA(C,P),1)-(P+1)*(S-1)*REF(EMA(C,S),1)+(S+1)*(P+1)*REF(MJ_2,1))/(2*P-2*S);
Z_4:=((P-1)*(S+1)*REF(EMA(C,P),1)-(P+1)*(S-1)*REF(EMA(C,S),1)+(S+1)*(P+1)*Z_1)/(2*P-2*S);
Y_1:=(MJ_2*X+((M+1)/(2*(M-1)))*MJ_3*X);
Y_2:=((P-1)*(S+1)*EMA(C,P)*X-(P+1)*(S-1)*EMA(C,S)*X+(S+1)*(P+1)*MJ_1*X)/(2*P-2*S);
Y_3:=((P-1)*(S+1)*EMA(C,P)*X-(P+1)*(S-1)*EMA(C,S)*X+(S+1)*(P+1)*MJ_2*X)/(2*P-2*S);
Y_4:=((P-1)*(S+1)*EMA(C,P)*X-(P+1)*(S-1)*EMA(C,S)*X+(S+1)*(P+1)*Y_1)/(2*P-2*S);
{-----------------【图解模板】---------------------}
{MACD}
FILLRGN(MJ_1>=MJ_2,MJ_1,MJ_2),Color689AFF;
FILLRGN(MJ_1
FILLRGN(MJ_3>MJ_5,MJ_5,MJ_3),ColorFFB7FF;
FILLRGN(MJ_3
STICKLINE(MJ_3
STICKLINE(MJ_30,0,MJ_3,0,0),COLORYELLOW;{黄}
STICKLINE(MJ_3>ref(MJ_3,1) and MJ_3<0,0,MJ_3,0,0),ColorAF00AF;{紫}
STICKLINE(MJ_3>ref(MJ_3,1) and MJ_3>0,0,MJ_3,0,0),COLORRED;{红}
DIFF: MJ_1,PRECISION2,COLORWHITE;
DEA: MJ_2,PRECISION2,COLORYELLOW;
加速:2.8*(MJ_2-MJ_1),LINETHICK,PRECISION2,COLORGREEN;
PARTLINE(RANGE(BARPOS,SYSPARAM(3)-34,SYSPARAM(3)+1),加速),LINEDOT,COLORGREEN;
{ _飞狐公式}
多头: MJ_3,LINETHICK2,PRECISION2,COLORRED;
预警:MJ_5,PRECISION2,ColorFF8900,ColorFFB500;
PARTLINE(MJ_1>=REF(MJ_1,1) AND MJ_2
PARTLINE(MJ_1REF(MJ_2,1),MJ_1),LINETHICK2,COLORBLUE;//蓝
{资金}
PARTLINE(1,0),LINETHICK2,COLORWHITE;//负
PARTLINE(ZJ6>=0,0),LINETHICK2,COLORRED;//正
{形态}
DRAWTEXT(低金,DEA*1,低金),PXDN8,COLORYELLOW;
DRAWTEXT(零下二次金叉,DEA*0.95,零下二金),PXDN8,COLORYELLOW;
DRAWTEXT(二金,DEA*0.85,二金),PXDN8,COLORYELLOW;
DRAWTEXT(底背,DEA*0.80,底背),PXDN8,COLORYELLOW;
DRAWTEXT(三全,DEA*0.75,三全),PXDN8,COLORRED;
DRAWTEXT(顶背,DEA,顶背),PXUP60,ColorFF5B00;
{信号}
VERTLINE(满仓),LINEDOT,COLORGRAY;
DRAWTEXT(满仓,加速, 第 /n 二 /n 天 /n 买 /n),ALIGN,COLORYELLOW;
DRAWICON(满仓,MJ_1*0.96,1),ALIGN,PXDN10;//多空差:34.47 成功率:83.08%
{估测转折股价--未来}
DRAWTEXTEX(sysparam(3)=BARPOS,0,6,2,今日DIFF转折: +NUMTOSTR(Z_2,2)),COLORGREEN;
DRAWTEXTEX(sysparam(3)=BARPOS,0,6,20,今日DEA转折: +NUMTOSTR(Z_3,2)),COLORGREEN;
DRAWTEXTEX(sysparam(3)=BARPOS,0,6,38,今日MACD转折:+NUMTOSTR(Z_4,2)),COLORGREEN;
DRAWTEXTEX(sysparam(3)=BARPOS,0,135,2,明日DIFF转折: +NUMTOSTR(Y_2,2)),COLORYELLOW;
DRAWTEXTEX(sysparam(3)=BARPOS,0,135,20,明日DEA转折: +NUMTOSTR(Y_3,2)),COLORYELLOW;
DRAWTEXTEX(sysparam(3)=BARPOS,0,135,38,明日MACD转折: +NUMTOSTR(Y_4,2)),COLORYELLOW;
换手:if(capital=0,v/sum(v,100)*100,v/FINANCE(7)),PRECISION2,LINETHICK,COLORGRAY;
涨跌幅:(C-REF(C,1))/REF(C,1)*100,PRECISION2,LINETHICK,COLORGRAY;
{取参数}
GDT2:=FINANCE(0);//报表最新日期
XXx:=STRTONUM(STRRIGHT(NUMTOSTR(FINANCE(0),0),2));//取右两位数
Nn:=IF(XXx>11 OR XXx<3,1,IF(BETWEEN(XXx,2.9,6),4,IF(BETWEEN(XXx,5.9,9),2,4/3))),LINETHICK;
市赢率:C/(FINANCE(33)*Nn),PRECISION2,LINETHICK,COLORGRAY;
市净率:C/FINANCE(34),PRECISION2,LINETHICK,COLORGRAY;选股票看什么指标最好 >更多精彩内容,请关注公众号:实盘操手
其他说明
1、在下载过程遇到问题,请您 联系客服:QQ:2180737354 或 微信:bsqj88885(暂时不能用) 备用微信:bsqj88886(暂时不能用),我们会在第一时间修复和反馈。
2、本站所提供的股票指标等资源请细看说明,适合自己再购买下载,指标不包安装,不懂的人切勿购买,新手勿扰。所有指标仅供参考学习交流,没稳赚的指标,赢亏自负,如果觉着指标好用请支持正版,否则产生的一切后果将由下载用户自行承担,有部分股票指标资源为网上收集或仿制而来,若模板侵犯了您的合法权益,请来联系我们,我们会及时删除,给您带来的不便,我们深表歉意!
⇒⇒⇒点击加入通达信指标公式交流群QQ群
- 上一篇: 大智慧止跌选股指标公式
- 下一篇: 大智慧强悍选股指标公式
猜你喜欢
- 2023-10-17 屏幕自适应定点均线(飞狐)
- 2023-10-17 主力轨迹+庄家出现+XG(飞狐)
- 2023-10-17 安全投机(飞狐)
- 2023-10-17 共振买卖(飞狐)
- 2023-10-17 江恩轮中轮(新画法)(飞狐)
- 2023-10-17 新版KDJ飞升马(飞狐)
- 2023-10-17 七剑下天山(飞狐)
- 2023-10-17 OSC (艾略特震荡器)(飞狐)
- 2023-10-17 买入安全区远离危险区(飞狐)
- 2023-10-17 熊市好用的选股(飞狐)