背离选股公式
1:DMI底背离
A4:=BARSLAST(REF(CROSS("DMI.PDI"(14,6),"DMI.MDI"(14,6)),1));
B4:=REF(C,A4+1)>C AND REF("DMI.PDI"(14,6),A4+1)<"DMI.PDI"(14,6) AND CROSS("DMI.PDI"(14,6),"DMI.MDI"(14,6));
底背离DMI:DRAWTEXT(FILTER(B4>0,5),LOW,'▲'),COLORYELLOW;
2:RSI底背离
{RSI底背离}
A3:=BARSLAST(REF(CROSS("RSI.RSI1"(12,26,9),"RSI.RSI2"(12,26,9)),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底背离:FILTER(B3>0,5);
3:KDJ底背
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),LOW,'▲');
4:MACD底背
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),LOW,'▲'),COLORYELLOW;