刚刚改编强大版主的(用内外盘差背离轻松判断:个股顶底 主力进出!! )
通达信指标改成大智慧指标 再加上背离
{内外盘差}
PJ:=(H+L+C)/3;
V1:=IF(H=L,1,H-MAX(O,C));
V2:=IF(H=L,1,MAX(C,O)-PJ);
V3:=IF(H=L,1,MIN(O,C)-L);
V4:=IF(H=L,1,PJ-MIN(C,O));
V5:=VOL/IF(H=L,4,H-L);
V6:=(V1*V5)+(V2*V5);
V7:=(V3*V5)+(V4*V5);
WP1:=DYNAINFO(23);
NP1:=DYNAINFO(22);
WP2:=IF(BARSTATUS=2,V7*240/IF(HOUR<12,60*(HOUR-9)-30+MINUTE,120+60*(HOUR-13)+MINUTE),V7);
NP2:=IF(BARSTATUS=2,V6*240/IF(HOUR<12,60*(HOUR-9)-30+MINUTE,120+60*(HOUR-13)+MINUTE),V6);
WP:=IF(BARSTATUS=2 AND VOL*240,WP1,WP2);
NP:=IF(BARSTATUS=2 AND VOL*240 ,NP1,NP2);
日差:WP-NP,LINETHICK0;
周差:SUM(日差,5),LINETHICK0;
月差:SUM(日差,22),LINETHICK0;
STICKLINE(日差>O,0,日差,-1,0),COLORRED;
STICKLINE(日差<O,0,日差,-1,0),COLORFFFF00;
五日差:MA(日差,5),LINETHICK2,COLORGREEN;
十日差:MA(日差,10),LINETHICK2,COLORYELLOW;
A1:=BARSLAST(ref(cross(五日差,十日差),1));
B1:=ref(c,A1+1)>c and ref(五日差,A1+1)<五日差 and cross(五日差,十日差);
背离:=FILTER(B1>0,5);
STICKLINE(背离,五日差+7500,十日差-7500,3,0),COLORwhite;
DRAWTEXT(背离,0.57,'背离'),COLORred;