当前位置:→ 公式网 > 通达信公式 > 正文 ℃ 公式解密、改选股等业务 联系点击查看详情...
以下是多空线,三背离,无未来(无源码的请下载附件导入)
C/C++ www.gszb.com 股票公式指标网提供 Code复制内容到剪贴板
- MA4:MA(CLOSE,5) ,COLORFF00FF,LINETHICK2;
- 判断3:IF(MA4<REF(MA4,1),MA4,DRAWNULL),COLORGREEN,LINETHICK2;DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
- DEA:=EMA(DIFF,9);
- MACD:=2*(DIFF-DEA);
- A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
- B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);
- DRAWICON(FILTER(B1>0,5),L*0.94,10);
- DRAWTEXT(FILTER(B1>0,5),L*0.94,'M底'),COLORGREEN;{MACD底背离}
- A2:=BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1));
- B2:=REF(C,A2+1)>C AND REF("KDJ.K",A2+1)<"KDJ.K" AND CROSS("KDJ.K","KDJ.D");
- DRAWICON(FILTER(B2>0,5),L*0.96,10);
- DRAWTEXT(FILTER(B2>0,5),L*0.96,'K底'),COLORYELLOW;{KDJ底背离}
- A3:=BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1));
- B3:=REF(C,A3+1)>C AND REF("RSI.RSI1",A3+1)<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2");
- DRAWICON(FILTER(B3>0,5),L*0.98,10);
- DRAWTEXT(FILTER(B3>0,5),L*0.98,'R底'),COLORCYAN;{RSI底背离}
- C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));
- D1:=REF(C,C1+1)<C AND REF(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF);
- DRAWICON(FILTER(D1>0,5),H*1.07,12);
- DRAWTEXT(FILTER(D1>0,5),H*1.07,'M顶'),COLOR0066FF;{MACD顶背离}
- C2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));
- D2:=REF(C,C2+1)<C AND REF("KDJ.K",C2+1)>"KDJ.K" AND CROSS("KDJ.D","KDJ.K");
- DRAWICON(FILTER(D2>0,5),H*1.05,12);
- DRAWTEXT(FILTER(D2>0,5),H*1.05,'K顶'),COLORRED;{KDJ顶背离}
- 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");
- DRAWICON(FILTER(D3>0,5),H*1.03,12),;
- DRAWTEXT(FILTER(D3>0,5),H*1.03,'R顶'),COLORMAGENTA,;{RSI顶背离};
上一篇:通达信主图源码:高抛 下一篇:波段特好的神鳌无敌指标源码