MACD-KDJ-RSI副图(通达信版本 源码)
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(FILTER(B1>0,5),0,'MACD'),COLORGREEN;
STICKLINE(FILTER(B1>0,5),-1,0,1,0),COLORGREEN;
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(FILTER(B2>0,5),0.5,'KDJ'),COLORYELLOW;
STICKLINE(FILTER(B2>0,5),0.5,-1,1,0),COLORYELLOW;
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(FILTER(B3>0,5),-0.25,'RSI'),COLORCYAN;
STICKLINE(FILTER(B3>0,5),-1,-0.25,1,0),COLORCYAN;
C1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1));
D1:=REF(C,C1+1)"MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF");
DRAWTEXT(FILTER(D1>0,5),-0.5,'MACD'),COLORWHITE;
STICKLINE(FILTER(D1>0,5),-0.5,1,1,0),COLORWHITE;
C2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));
D2:=REF(C,C2+1)"KDJ.K" AND CROSS("KDJ.D","KDJ.K");
DRAWTEXT(FILTER(D2>0,5),0,'KDJ'),COLORWHITE;
STICKLINE(FILTER(D2>0,5),1,0,1,0),COLORWHITE;
C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));
D3:=REF(C,C3+1)"RSI.RSI1" AND CROSS("RSI.RSI2","RSI.RSI1");
DRAWTEXT(FILTER(D3>0,5),0.25,'RSI'),COLORMAGENTA;
STICKLINE(FILTER(D3>0,5),1,0.25,1,0),COLORMAGENTA;
- 上一篇公式:KDJ自用战法。源码,贴图,用法。
- 下一篇公式:强势选股(源码 贴图 说明)