把(流氓OBV)做成“底背离”预警公式
更多金钻指标股票技术讨论QQ群:966329692 技术讨论QQ群:220302856 技术讨论QQ群:39652085 如群满可换一个

编写要求:

{流氓OBV}OBV0:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE=ref(SUB,1),rgb(255,0,0),SUB长均 AND REF(中均,1)REF(短均,1) AND 短均>=中均,中均,0,2,1),COLORFF00F2;FILLRGN(短均,SUB,短均SUB,rgb(0,50,180)),layer5;FILLRGN(长均,短均,长均<短均,rgb(200,0,100),长均>短均,rgb(0,100,100)),layer5;TY:=SUB;AA1:=REF(TY,10)=HHV(TY,2*10+1); B1:=FILTER(AA1,10); C1:=BACKSET(B1,10+1); HD:=FILTER(C1,10);AA2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(AA2,10); C2:=BACKSET(B2,10+1); LD:=FILTER(C2,10);AB:=REF(SUB,BARSLAST(HD));T1:=BARSLAST(HD)BARSLAST(LD) AND NOT(LD);峰:IF(T1,AB,AB),COLORYELLOW,POINTDOT;0,COLORFF99FF;DIF:=EMA(C,5)-EMA(C,13);DEA:=EMA(DIF,9);A1:=BARSLAST(REF(CROSS(DIF,DEA),1));C1:=BARSLAST(REF(CROSS(DEA,DIF),1));底背离:REF(C,A1+1)>C AND REF(DIF,A1+1)DIF AND CROSS(DEA,DIF),COLORff00ff,LINETHICK2;drawtext(底背离>0,15,'←底背离'),COLORwhite;drawtext(顶背离>0,15,'←顶背离'),COLORwhite;

解答:

 DIF:=EMA(C,5)-EMA(C,13);

DEA:=EMA(DIF,9);
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
C1:=BARSLAST(REF(CROSS(DEA,DIF),1));
底背离:REF(C,A1+1)>C AND REF(DIF,A1+1)<DIF AND CROSS(DIF,DEA);

选股票看什么指标最好 >股票指标网