• 欢迎访问第一股票指标公式网,汇集目前最全,最新的各种股票公式,股票指标公式,公式下载等股票软件指标公式源码

同花顺多指数共振钝化背离结构公式

同花顺公式 第一股票指标公式网 2个月前 (11-30) 9次浏览 已收录 0个评论 扫描二维码

//多指数共振钝化背离结构

N:=10;

M:=16;

SQX:=(C-MA(CLOSE,13))*100;

DIF:=EMA(MA(SQX,7),1),colorwhite;

DEA:=EMA(DIF,7),coloryellow;

DIF2:100*(EMA(CLOSE,12)-EMA(CLOSE,26));

DEA2:EMA(DIF2,9);

macd:=(DIF-DEA)*2,COLORSTICK;

STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,0.1,0),colorred;

STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,0.1,0),COLOR00FFFF;

死叉:=CROSS(DEA2,DIF2);

N1:=BARSLAST(死叉);

N2:=REF(BARSLAST(死叉),N1+1);

N3:=REF(BARSLAST(死叉),N2+N1+2);

STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,0.1,0),COLORFFFF00;

STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,0.1,0),COLORFF00A9;

CL1:=LLV(C,N1+1);

DIFL1:=LLV(DIF2,N1+1);

RSV:=((CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21)))*247.2-123.6;

K:SMA(SMA( RSV,3,1),3,1),colorwhite;

D:MA(EMA(K,3),3),coloryellow;

J:3*K-2*D,colormagenta;

CL2:=REF(CL1,N1+1);

DIFL2:=REF(DIFL1,N1+1);

CL3:=REF(CL2,N1+1);

DIFL3:=REF(DIFL2,N1+1);

A11:=BARSLAST(REF(CROSS(DIF,DEA),1));

PDIFL2:=IF(DIFL2>0,INTPART(LOG(DIFL2))-1,INTPART(LOG(-DIFL2))-1);

MDIFL2:=INTPART(DIFL2/POW(10,PDIFL2));

B1:=REF(C,A11+1)>C AND REF(DIF,A11+1)<DIF AND CROSS(DIF,DEA);

A12:=BARSLAST(REF(CROSS("KDJ.K","kdj.D"),1));

B2:=REF(C,A12+1)>C AND REF("kDJ.K",

A12+1)<"KDJ.K" AND CROSS("KDJ.K","KDJ.D");

A13:=BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1));

PDIFL3:=IF(DIFL3>0,INTPART(LOG(DIFL3))-1,INTPART(LOG(-DIFL3))-1);

MDIFL3:=INTPART(DIFL3/POW(10,PDIFL3));

B3:=REF(C,A13+1)>C AND REF("RSI.RSI1",

A13+1)<"RSI.RSI1"AND CROSS("RSI.RSI1","RSI.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("KDJ.D","KDJ.K"),1));

MDIFB2:=INTPART(DIF2/POW(10,PDIFL2));

MDIFB3:=INTPART(DIF2/POW(10,PDIFL3));

D2:=REF(C,C2+1)<C AND REF("KDJ.K",C2+1)>"KDJ.K" AND CROSS("KDJ.D","KDJ.K");

C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));

D3:=REF(C,C3+1)<C AND REF("RSI.RSI1",

C3+1)>"RSI.RSI1" AND CROSS("RSI.RSI2","RSI.RSI1");

直接底背离:=(CL1<CL2 ) AND (MDIFB2>MDIFL2) AND

(MACD<0 AND REF(MACD,1)<0) AND MDIFB2<=REF(MDIFB2,1);

隔峰底背离:=(CL1<CL3 AND CL3<CL2 ) AND (MDIFB3>MDIFL3)

AND (MACD<0 AND REF(MACD,1)<0) AND MDIFB3<=REF(MDIFB3,1);

MACD底背:IF(B1>0,50,0),LINETHICK2,colorred;

KDJ底背:IF(B2>0,65,0),LINETHICK2,COLORFF00FF;

B:=(直接底背离 OR 隔峰底背离);

BG:=((MDIFB2>REF(MDIFB2,1))*REF(直接底背离,1))

OR ((MDIFB3>REF(MDIFB3,1))*REF(隔峰底背离,1));

底背离消失:=(REF(直接底背离,1) AND DIFL1<=DIFL2 )

OR (REF(隔峰底背离,1) AND DIFL1<=DIFL3);

RSI底背:IF(B3>0,80,0),LINETHICK2,coloryellow;

MACD顶背:IF(D1>0,-50,0),LINETHICK2,COLOR00FF00;

STICKLINE(B OR BG,DIF2,DEA2,8,0),colorred;

DRAWTEXT((B AND COUNT(B,2)=1),(DIF2*1.5),'钝化'),coloryellow;

KDJ顶背:IF(D2>0,-65,0),LINETHICK2,COLORFFCC66;

RSI顶背:IF(D3>0,-80,0),LINETHICK2,colorwhite;

DRAWTEXT(FILTER(底背离消失,10),(DIF2+MACD),'底背离消失'),colormagenta;

STICKLINE(BG,0,(DIF2+DEA2),5,0), colorred;


第一股票指标公式网所有股票公式及文章来源于网络仅供学习研究,请勿以此为依据进行股票交易。 版权投诉邮箱:313707241@qq.com 投放广告公式交流 QQ:313707241
喜欢 (0)
[]
分享 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址