通达信精准背离分时指标公式

[复制链接]
查看134 | 回复0 | 2021-8-20 20:45:23 | 显示全部楼层 |阅读模式

N:=5;
FF:=(C-REF(C,N))/REF(C,N);
STICKLINE(FF>0,DYNAINFO(3),DYNAINFO(3)*(1+FF),0.5,0),COLORRED;
STICKLINE(FF<0,DYNAINFO(3),DYNAINFO(3)*(1+FF),0.5,0),COLORGREEN;
A1:=BARSLAST(REF(CROSS("MACD.DIF"(12,26,9),"MACD.DEA"(12,26,9)),1));
B1:=REF(C,A1+1)>C AND REF("MACD.DIF"(12,26,9),A1+1)<"MACD.DIF"(12,26,9) AND CROSS("MACD.DIF"(12,26,9),"MACD.DEA"(12,26,9));
底MACD:DRAWTEXT(FILTER(B1>0,5),HIGH*0.9988,'↖'),COLOR80FFFF;
DRAWTEXT(FILTER(B1>0,5),LOW*0.997,'MACD底'),COLORFF55FF;
A2:=BARSLAST(REF(CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3)),1));
B2:=REF(C,A2+1)>C AND REF("KDJ.K"(9,3,3),A2+1)<"KDJ.K"(9,3,3) AND CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));
底KDJ:DRAWTEXT(FILTER(B2>0,5),HIGH*0.9988,'↖'),COLOR80FFFF;
DRAWTEXT(FILTER(B2>0,5),LOW*0.997,'KDJ底'),COLORFF55FF;
A3:=BARSLAST(REF(CROSS("RSI.RSI1"(8,55,55),"RSI.RSI2"(8,55,55)),1));
B3:=REF(C,A3+1)>C AND REF("RSI.RSI1"(8,55,55),A3+1)<"RSI.RSI1"(8,55,55) AND CROSS("RSI.RSI1"(8,55,55),"RSI.RSI2"(8,55,55));
底RSI:DRAWTEXT(FILTER(B3>0,5),HIGH*0.9988,'↖'),COLOR3EFFFF;
DRAWTEXT(FILTER(B3>0,5),LOW*0.997,'RSI底'),COLOR00FFFF;
C1:=BARSLAST(REF(CROSS("MACD.DEA"(12,26,9),"MACD.DIF"(12,26,9)),1));
D1:=REF(C,C1+1)<C AND REF("MACD.DIF"(12,26,9),C1+1)>"MACD.DIF"(12,26,9) AND CROSS("MACD.DEA"(12,26,9),"MACD.DIF"(12,26,9));
顶MACD:DRAWTEXT(FILTER(D1>0,5),HIGH*1.0008,'↙'),COLORFFFF00;
DRAWTEXT(FILTER(D1>0,5),HIGH*1.003,'MACD顶'),COLORFFFF00;
C2:=BARSLAST(REF(CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3)),1));
D2:=REF(C,C2+1)<C AND REF("KDJ.K"(9,3,3),C2+1)>"KDJ.K"(9,3,3) AND CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3));
顶KDJ:DRAWTEXT(FILTER(D2>0,5),HIGH*1.0008,'↙'),COLORFFFF00;
DRAWTEXT(FILTER(D2>0,5),HIGH*1.003,'KDJ顶'),COLORFFFF00;
C3:=BARSLAST(REF(CROSS("RSI.RSI2"(8,55,55),"RSI.RSI1"(8,55,55)),1));
D3:=REF(C,C3+1)<C AND REF("RSI.RSI1"(8,55,55),C3+1)>"RSI.RSI1"(8,55,55) AND CROSS("RSI.RSI2"(8,55,55),"RSI.RSI1"(8,55,55));
顶RSI:DRAWTEXT(FILTER(D3>0,5),HIGH*1.0008,'↙'),COLOR00FF00;
DRAWTEXT(FILTER(D3>0,5),HIGH*1.003,'RSI顶'),COLOR00FFFF;

202108201334.jpg

202108201334.jpg

 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则