峰谷线主图指标 通达信公式(附图
2018-11-07 来源:网络收集 编辑:粘花惹草爱股票通达信峰谷线主图指标公式TY:=L;A1:=REF(TY,10)=HHV(TY,2*10+1); B1:=FILTER(A1,10); C1:=BACKSET(B1,10+1); HD:=FILTER(C1,10);A2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(A2,10); C2:=BACKSET(B2,10+1); LD:=FILTER(C2,10);前期低位:REF(L,BARSLAST(LD)),COLOR00FF00,POINTDOT;STICKLINE(L,前期低位,前期低位,8,0),COLORRED;TZ:=H;A3:=REF(TY,10)=HHV(TY,2*10+1); B3:=FILTER(A1,10); C3:=BACKSET(B1,10+1); MD:=FILTER(C1,10);A4:=REF(TY,10)=LLV(TY,2*10+1); B4:=FILTER(A2,10); C4:=BACKSET(B2,10+1); ND:=FILTER(C2,10);前期高位:REF(H,BARSLAST(MD)),COLOR00FF00,POINTDOT;STICKLINE(H,前期高位,前期高位,8,0),COLORGREEN;{精准线}N:=3;L0:=0.00;{点位差参数}{底精准线}L1:=ABS(L-REF(L,1))<=L0;L2:=ABS(L-REF(L,2))<=L0;L3:=ABS(L-REF(L,3))<=L0;L4:=ABS(L-REF(L,4))<=L0;L5:=ABS(L-REF(L,5))<=L0;精准线首次:=L1 OR L2 OR L3 OR L4 OR L5;精准左:=FILTER(精准线首次,N) ;天数:=BARSLAST(精准左);LTS:=REF(L,天数);精准右:=ABS(L-LTS)<=L0;STICKLINE(精准左,L,L,50,1),COLORMAGENTA;{顶精准线}G1:=ABS(H-REF(H,1))<=L0;G2:=ABS(H-REF(H,2))<=L0;G3:=ABS(H-REF(H,3))<=L0;G4:=ABS(H-REF(H,4))<=L0;G5:=ABS(H-REF(H,5))<=L0;精准线首次1:=G1 OR G2 OR G3 OR G4 OR G5;精准左1:=FILTER(精准线首次1,N) ;天数1:=BARSLAST(精准左1);HTS:=REF(H,天数1);精准右1:=ABS(H-HTS)<=L0;STICKLINE(精准左1,H,H,50,-1),COLORCYAN;ZDF:=(C-REF(C,1))/REF(C,1)*100;STICKLINE(C<0.905*REF(C,1),C,O,3,0),COLORGREEN;STICKLINE(C>1.095*REF(C,1),C,O,3,0),COLORRED;XQ:=OPEN<REF(L,1)AND H<REF(L,1);SQ:=OPEN>REF(H,1)AND L>REF(H,1);ZT:=CLOSE/REF(CLOSE,1)>=1.095 AND C=H;DT:=CLOSE/REF(CLOSE,1)<=0.905 AND C=L;STICKLINE(XQ,REF(L,1),H,3,0),COLORMAGENTA;STICKLINE(SQ,REF(H,1),L,3,0),COLORMAGENTA;DRAWKLINE(HIGH,OPEN,LOW,CLOSE);STICKLINE(ZT,OPEN,CLOSE,3,0),COLORRED;STICKLINE(DT,OPEN,CLOSE,3,0),COLORGREEN;VARA:=O;VARB:=C;VARC:=H;VARD:=L;AA:=REF(C,1)>REF(O,1) AND C>O AND C<=REF(C,1);BB:=REF(C,1)<REF(O,1) AND C>O AND C<=REF(C,1);STICKLINE(AA OR BB,O,C,1,0),COLORYELLOW;M:=REF(C,1)>REF(O,1) AND C<O AND C>=REF(C,1);M1:=REF(C,1)<REF(O,1) AND C<O AND C>=REF(C,1);STICKLINE(M OR M1,O,C,1,0),COLORRED;