修改飞狐之字转向指标数值
2019/12/14 17:58:52
公式编写说明:
源码:input:N(12,1,88);V1:=ISLASTBAR;V2:=REF(HIGH,N)=HHV(HIGH,2*N+1);V3:=FILTER(V2,N);V4:=BACKSET(V3,N+1);V5:=FILTER(V4,N);V6:=V5 OR V1;V7:=REF(LOW,N)=LLV(LOW,2*N+1);V8:=FILTER(V7,N);V9:=BACKSET(V8,N+1);VA:=FILTER(V9,N);VB:=VA AND NOT(V5);VC:=BACKSET(V6,REF(BARSLAST(VB),1)+1);VD:=VC>REF(VC,1);VE:=BACKSET(VD,2);VF:=VE>REF(VE,1);V10:=BACKSET(VF AND COUNT(V6,REF(BARSLAST(VB),1)+2)=0,REF(BARSLAST(VB),1)+2);V11:=V10>REF(V10,1);V12:=BACKSET(V11 AND COUNT(V6,REF(BARSLAST(VB),1)+2)=0,REF(BARSLAST(VB),1)+2);V13:=V12>REF(V12,1);V14:=IF(V6,COUNT(VB,REF(BARSLAST(V6),1)+1),0);V15:=IF(V14=1 AND V6,BARSLAST(VF),0);V16:=IF(V6 AND REF(LOW,BARSLAST(VF))>=REF(LOW,BARSLAST(V11)),BARSLAST(V11),BARSLAST(VF));V17:=IF(V14=2 AND V6,V16,0);V18:=IF(V14>=3 AND V6,IF(V6 AND REF(LOW,V16)>=REF(LOW,BARSLAST(V13)),BARSLAST(V13),V16),0);V19:=V15+V17+V18;V1A:=BACKSET(V6,V19);V1B:=V1A>REF(V1A,1);V1C:=BACKSET(V1B,2);V1D:=V1C>REF(V1C,1);V1E:=V1D OR V1;V1F:=BACKSET(V1E,REF(BARSLAST(V6),1)+1);V20:=V1F>REF(V1F,1);V21:=BACKSET(V20,2);V22:=V21>REF(V21,1);V23:=BACKSET(V22 AND COUNT(V1E,REF(BARSLAST(V6),1)+2)=0,REF(BARSLAST(V6),1)+2);V24:=V23>REF(V23,1);V25:=BACKSET(V24 AND COUNT(V1E,REF(BARSLAST(V6),1)+2)=0,REF(BARSLAST(V6),1)+2);V26:=V25>REF(V25,1);V27:=IF(V1E,COUNT(V5,REF(BARSLAST(V1E),1)+1),0);V28:=IF(V27=1 AND V1E,BARSLAST(V22),0);V29:=IF(V1E AND REF(HIGH,BARSLAST(V22))<=REF(HIGH,BARSLAST(V24)),BARSLAST(V24),BARSLAST(V22));V2A:=IF(V27=2 AND V1E,V29,0);V2B:=IF(V27>=3 AND V1E,IF(V1E AND REF(HIGH,V29)<=REF(HIGH,BARSLAST(V26)),BARSLAST(V26),V29),0);V2C:=V28+V2A+V2B;V2D:=BACKSET(V1E,V2C);V2E:=V2D>REF(V2D,1);V2F:=BACKSET(V2E,2);V30:=V2F>REF(V2F,1);DRAWLINE(V1D,LOW,V30,HIGH,0),COLORGRAY;DRAWLINE(V30,HIGH,V1D,LOW,0),COLORGRAY;
公式源码示例:
公式末尾添上:
drawtext(v1d and barscount(v30),l,numtostr(barslast(v30),0)+'天\n差值'+numtostr(ref(h,barslast(v30)-l),2))pxdn10;
drawtext(v30 and barscount(v1d),h,numtostr(barslast(v1d),0)+'天\n差值'+numtostr(ref(h,barslast(v1d)-l),2))pxup60;
看 股吧公式 www.ka nguba.com
其它股票公式列表