MACD二次金叉
DIFF:=EMA(CL0SE,12)-EMA(CLOSE,26);{选股设JC=10即可}
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA),COLORSTICK;
A:=IF(CROSS(0,DEA),1,0);
A1:=IF(DIFF<0ANDCROSS(DIFF,DEA),1,0);
SS:=IF(A,SUM(A1,0),0);
SSB:=HHV(SS,0);
SSS:=SUM(A1,0);
JC:IF(SSS-SSB=2ANDSSS>REF(SSS,1),10,0);
三背离
{上出下买+三背}
A:=MA(CLOSE,17)+ABS(MA(CLOSE,17)-REF(MA(CLOSE,17),1));
B:=MA(CLOSE,17)+MA(CLOSE,17)-REF(MA(CLOSE,17),1);
分水岭:IF(MA(CLOSE,17)
操作线:分水岭-(EMA(C,3)-分水岭),COLOR00FFFF,LINETHICK2;
PM:MA(C,5),COLORWHITE,LINETHICK2;
IF(PM>REF(PM,1),PM,DRAWNULL),COLORRED,LINETHICK2;
IF(PM=REF(PM,1),PM,DRAWNULL),COLORRED;
S:=(PM>操作线);
IF(DD,分水岭,DRAWNULL),COLOR00FF00,LINETHICK2;
IF(S,分水岭,DRAWNULL),C0L0ROOFFOO,P0INTD0T,LINETHICK4;
DRAWICON(CROSS(分水岭,操作线),分水岭-0.1,1);{买入红箭头}
A1:=BARSLAST(REF(CR0SS("",""),1));
B1:=REF(C,A1+1)>CANDREF("",A1+1)<""
CR0SS("","");
DRAWTEXT(B1>0,L-0.02,'MACD底背离'),C0L0ROOFFFF;{MACD底背离}
A2:=BARSLAST(REF(CR0SS("KDJ.K","KDJ.D"),1));
B2:=REF(C,A2+1)>CANDREF("KDJ.K",A2+1)<"KDJ.K"ANDCR0SS("KDJ.K","KDJ.D");
DRAWTEXT(B2,L-0.10,'KDJ底背离'),C0L0RFF00FF;{KDJ底背离}
A3:=BARSLAST(REF(CR0SS("1","2"),1));
B3:=REF(C,A3+1)>CANDREF("1",A3+1)<"1"
CR0SS("1","2");
DRAWTEXT(B3>0,L-0.18,'RSI底背离'),C0L0ROOOOFF;{RSI底背离}
C1:=BARSLAST(REF(CR0SS("",""),1));
D1:=REF(C,C1+1)
AND
AND
AND
CROSS("","");
DRAWTEXT(D1>0,H+0.16,'MACD顶背离'),COLOR00FF00;{MACD顶背离}
C2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));
D2:=REF(C,C2+1)
DRAWTEXT(D2>0,H+0.08,'KDJ顶背离'),COLORFFFFCC;{KDJ顶背离}
C3:=BARSLAST(REF(CROSS("2","1"),1));
D3:=REF(C,C3+1)
CROSS("2","1");
DRAWTEXT(D3>0,H+0.04,'RSI顶背离'),COLORFF9900;{RSI顶背离};
AND
本文发布于:2022-12-06 22:58:35,感谢您对本站的认可!
本文链接:http://www.wtabcd.cn/fanwen/fan/88/55768.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |