通达信牛叉主图指标公式
通达信收口布林主图指标公式
N:=3;
DRAWBAND(MA(C,2),RGB(150,10,10),MA(C,5),RGB(0,100,100));
DRAWKLINE(H,O,L,C);
Q5:MA(C,5),COLORYELLOW;
X:=C=HHV(C,20);
D:=BArslAst(X);
XD:=IF(D>0,REF(C,D),REF(C,D));
JC:=crOSS(C,REF(XD,1));
突破1:=JC AND COUNT(JC,5)=1,COLORYELLOW;
强势股:=H/REF(L,1)>1.15 OR H/REF(L,2)>1.18;
回调:=L/REF(H,1)<0.96 AND C<REF(C,1);
买入:=REF(强势股,1) AND 回调;
TY:=H;
AA1:=REF(TY,N)=HHV(TY,2*N+1); BA1:=FILTER(AA1,N); CA1:=BacKSET(BA1,N+1); HD1:=FILTER(CA1,N);
AA2:=REF(TY,N)=LLV(TY,2*N+1); BA2:=FILTER(AA2,N); CA2:=BACKSET(BA2,N+1); LD1:=FILTER(CA2,N);
前高1:=REF(H,BARSLAST(HD1)),COLORRED,NODRAW;
突破:突破1 AND C>前高1,COLORRED,NODRAW;
突破回调买:IF(COUNT(突破,5)=1 AND 突破=0
AND 买入 AND C>前高1,-2,0),NODRAW;
DRAWICON(突破,REF(H,1)*1.02,24);
DRAWICON(突破回调买=-2,REF(H,1)*1.02,12);
高:=REF(HHV(H,80),3);
低:=REF(LLV(L,80),3);
H18:=高-(高-低)*0.181;
L19:=低+(高-低)*0.181;
H中:=高-(高-低)*0.5;
顶点:REFDATE(高,DATE),COLORWHITE;
%18:REFDATE(H18,DATE),COLORYELLOW;
%50:REFDATE(H中,DATE),COLORRED;
%19:REFDATE(L19,DATE),COLORYELLOW;
低点:REFDATE(低,DATE),COLORWHITE;
DRAWTEXT(ISLASTBAR,顶点,' %顶点'),COLORWHITE;
DRAWTEXT(ISLASTBAR,%18,'%18'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,%50,'%50'),COLORRED;
DRAWTEXT(ISLASTBAR,%19,'%19'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,低点,' %低点'),COLORWHITE;
Z1:=STRCAT(HYBLOCK,' ');
Z2:=STRCAT(Z1,DYBLOCK);
Z3:=STRCAT(Z2,' ');
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLOR00C0C0;
A1:=REF(H,N)=HHV(H,2*N+1);
B1:=FILTER(A1,N);
C1:=BACKSET(B1,N+1);
D1:=FILTER(C1,N);
A2:=REF(L,N)=LLV(L,2*N+1);
B2:=FILTER(A2,N);
C2:=BACKSET(B2,N+1);
D2:=FILTER(C2,N);
E1:=(REF(LLV(L,2*N),1)+REF(HHV(H,2*N),1))/2;
E2:=(H+L)/2;
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(C)=1;
L1:=(D2 AND NOT(D1 AND E1<E2));
H2:=D1 AND NOT(D2 AND E1>=E2);
X1:=REF(BARSLAST(H1),1)+1;
F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,L,10000),X1));
G1:=F1>REF(F1,1);
I1:=BACKSET(G1,2);
LD:=I1>REF(I1,1);
L2:=LD OR ISLASTBAR OR BARSCOUNT(C)=1;
X2:=REF(BARSLAST(L2),1)+1;
F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,H,0),X2));
G2:=F2>REF(F2,1);
I2:=BACKSET(G2,2);
HD:=I2>REF(I2,1);
R1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);
S1:=R1>REF(R1,1),COLORRED,NODRAW;
T1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
U1:=T1>REF(T1,1),COLORRED,NODRAW;
R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2);
S2:=R2>REF(R2,1),COLORRED,NODRAW;
T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);
U2:=T2>REF(T2,1),COLORRED,NODRAW;
DRAWICON(U1,L*0.98,11);
DRAWICON(S1,H*1.01,25);
DRAWICON(U2,L*0.98,13);
DRAWICON(S2,H*1.01,25);
NOTEXT1:=DRAWLINE(S2,H,S1,H,1),LINETHICK2,COLORRED;
NOTEXT2:=DRAWLINE(U2,L,U1,L,1),LINETHICK2,COLORGREEN;
前二高:=REF(H,BARSLAST(S2)),COLOR99FF66,LINETHICK1,DOTLINE;
前高:=REF(H,BARSLAST(S1)),COLOR99FF66,LINETHICK2,DOTLINE;
前二低:=REF(L,BARSLAST(U2)),COLORYELLOW,LINETHICK1,DOTLINE;
下降压力:=DRAWLINE(HIGH>=HHV(HIGH,10),HIGH,LOW<=LLV(LOW,3)
,HHV(HIGH,3),1),COLORYELLOW,LINETHICK2;
通达信线形双底指标公式