在线检测未来函数

通达信均线+背离主图指标公式

来源:Internet,编辑:股旁网,2013-01-08

★M底:MACD底背离; ★K底:KDJ底背离; ★R底:RSI底背离; $M顶:MACD顶背离; $K顶:KDJ顶背离; $顶R:RSI顶背离; 股价高位,MACD顶背离坚决卖出;股价低位,多项底背离,坚决买入。

M1:=4;M2:=10;M3:=20;M4:=30;M5:=62;M6:=133;
MA4:MA(CLOSE,M1);
MA10:MA(CLOSE,M2);
MA20:MA(CLOSE,M3);
MA62:MA(CLOSE,M4);
MA133:MA(CLOSE,M5);
MA256:MA(CLOSE,M6);
A1:=BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1));
B1:=REF(C,A1+1)>C AND REF("MACD.DIF",A1+1)<"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA");
DRAWTEXT(B1>0,L-0.06,'★M底'),COLORWHITE;
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");
DRAWTEXT(B2,L-0.26,'★K底'),COLORWHITE;
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");
DRAWTEXT(B3>0,L-0.46,'★R底'),COLORWHITE;
C1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1));
D1:=REF(C,C1+1)<C AND REF("MACD.DIF",C1+1)>"MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF");
DRAWTEXT(D1>0,H+0.06,'$M顶'),COLORYELLOW;
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");
DRAWTEXT(D2>0,H+0.26,'$K顶'),COLORYELLOW;
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");
DRAWTEXT(D3>0,H+0.46,'$R顶'),COLORYELLOW;

通达信均线+背离主图指标公式

 

相关文章