通达信直效主图指标公式
2020/2/2 19:18:44
N:=10;CX:=1;
MA06:MA(C,6),COLOR00FFFF,POINTDOT;
MA18:MA(C,18),COLOREEEEEE,POINTDOT;
IF(MA06>=REF(MA06,1),MA06,DRAWNULL),COLOR0000CC,LINETHICK2;
IF(MA06<REF(MA06,1) AND CX=1,MA06,DRAWNULL),COLOR009900,LINETHICK2;
IF(MA18>=REF(MA18,1) AND CX=2,MA18,DRAWNULL),COLOR0000CC,LINETHICK2;
IF(MA18<REF(MA18,1) AND CX=2,MA18,DRAWNULL),COLOR009900,LINETHICK2;
BZA06:=BARSLAST(C<MA06);
BZB06:=BARSLAST(MA06<REF(MA06,1));
BZA18:=BARSLAST(C<MA18);
BZB18:=BARSLAST(MA18<REF(MA18,1));
BDA06:=BARSLAST(C>MA06);
BDB06:=BARSLAST(MA06>REF(MA06,1));
BDA18:=BARSLAST(C>MA18);
{投股票网-股票公式网站 www.tou18.cn}
BDB18:=BARSLAST(MA18>REF(MA18,1));
V06:MA(VOL,6),COLOR6666CC,NODRAW;
V36:MA(VOL,36),COLORFFCC00,NODRAW;
VVOL:V,COLORFF00FF,NODRAW;
A1:=REF(C,N)=HHV(C,2*N+1);
B1:=FILTER(A1,N);
C1:=BACKSET(B1,N+1);
HD:=FILTER(C1,N);
A2:=REF(C,N)=LLV(C,2*N+1);
B2:=FILTER(A2,N);
C2:=BACKSET(B2,N+1);
LD:=FILTER(C2,N);
A:=REF(C,BARSLAST(HD)); B:=REF(C,BARSLAST(LD));
T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD) ;
T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);
IF(T1,A,DRAWNULL),COLORCC6600,LINETHICK2;
IF(T2,B,DRAWNULL),COLORDDDDDD,LINETHICK2;
IF(T1,A*0.9,DRAWNULL),COLORCC6600,LINETHICK1;
IF(T2,B*1.1,DRAWNULL),COLORDDDDDD,LINETHICK1;
YIN1:=BDA06>=2 AND BDB06=1 AND CX=1;
YIN2:=BDA18>=2 AND BDB18=1 AND CX=2;
YIN3:=BZA06>=2 AND BZB06=1 AND V06>V36 AND CX=1;
YIN4:=BZA06>=2 AND BZB06=1 AND V06>V36 AND CX=2;
DRAWTEXT(YIN1 OR YIN2,H*1.05,'卖出'),COLOR00FFFF;
DRAWTEXT(YIN3 OR YIN4,L*0.90,'买入'),COLOR00FF00;
投股票 网 ww w.tou18.cn
股市公式下载推荐