将下面公式中的背离做成选股公式
2020/1/21 19:10:39
公式编写说明:
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;请老师将上面公式中的背离做成大智慧选股公式
公式源码回答:
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;
五日差:=MA(日差,5);
十日差:=MA(日差,10);
A1:=BARSLAST(ref(cross(五日差,十日差),1));
B1:=ref(c,A1+1)>c and ref(五日差,A1+1)<五日差 and cross(五日差,十日差);
背离:FILTER(B1>0,5);
投股 票网 www.tou1 8.cn
股市公式下载推荐