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);
{ Gupang.com 股-旁-网_大智慧股票指标公式}
日差:WP-NP,LINETHICK0;
周差:SUM(日差,5),LINETHICK0;
月差:SUM(日差,22),LINETHICK0;
STICKLINE(日差>O,0,日差,-1,0),COLORRED;
STICKLINE(日差
十日差: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;