和迅阳光飞狐里"逃顶"主图指标
n:=5;
s1:=IF(STKTYPE=0 OR STKTYPE=7,0.999,0.98);
s2:=IF(STKTYPE=0 OR STKTYPE=7,1.001,1.02);
MA06:MA(CLOSE,6),PRECISION2,COLOR00FFFF,LINEDOT;
MA18:MA(CLOSE,18),PRECISION2,COLOREEEEEE,LINEDOT;
PARTLINE(MA06>=REF(MA06,1) {AND CX=1},MA06),COLOR0000CC,LINETHICK2;
PARTLINE(MA06<REF(MA06,1) {AND CX=1},MA06),COLOR009900,LINETHICK2;
PARTLINE(MA18>=REF(MA18,1) {AND CX=2},MA18),COLOR0000CC,LINETHICK2;
PARTLINE(MA18<REF(MA18,1) {AND CX=2},MA18),COLOR009900,LINETHICK2;
BZA06:=BARSLAST(CLOSE<MA06);
BZB06:=BARSLAST(MA06<REF(MA06,1));
BZA18:=BARSLAST(CLOSE<MA18);
BZB18:=BARSLAST(MA18<REF(MA18,1));
BDA06:=BARSLAST(CLOSE>MA06);
BDB06:=BARSLAST(MA06>REF(MA06,1));
BDA18:=BARSLAST(CLOSE>MA18);
BDB18:=BARSLAST(MA18>REF(MA18,1));
V06:MA(VOL,6),LINETHICK0,PRECISION0,COLOR6666CC;
V36:MA(VOL,36),LINETHICK0,PRECISION0,COLORFFCC00;
VVOL:VOL,LINETHICK0,PRECISION0,COLORFF00FF;
A1:=REF(CLOSE,N)=HHV(CLOSE,2*N+1); B1:=FILTER(A1,N); C1:=BACKSET(B1,N+1); HD:=FILTER(C1,N);
A2:=REF(CLOSE,N)=LLV(CLOSE,2*N+1); B2:=FILTER(A2,N); C2:=BACKSET(B2,N+1); LD:=FILTER(C2,N);
A:=REF(CLOSE,BARSLAST(HD)); B:=REF(CLOSE,BARSLAST(LD));
t1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD) ;
t2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);
PARTLINE(t1,A),COLORCC6600,LINETHICK2;
PARTLINE(t2,B),COLORDDDDDD,LINETHICK2;
DRAWNUMBER(t1=0 and REF(t1,1)>0 or ISLASTBAR and t1>0,REF(a,1),REF(a,1),2),COLORCC6600;
DRAWNUMBER(t2=0 and REF(t2,1)>0 or ISLASTBAR and t2>0,REF(b,1),REF(b,1),2),COLORDDDDDD;
PARTLINE(t1,A*0.9),COLORCC6600,LINETHICK1;
DRAWNUMBER(t1=0 and REF(t1,1)>0 or ISLASTBAR and t1>0,REF(a*0.9,1),REF(a*0.9,1),2),COLORCC6600;
PARTLINE(t2,B*1.1),COLORDDDDDD,LINETHICK1;
DRAWNUMBER(t2=0 and REF(t2,1)>0 or ISLASTBAR and t2>0,REF(b*1.1,1),REF(b*1.1,1),2),COLORCDDDDDD;
tj:=CLOSE>OPEN or CLOSE=OPEN and CLOSE>REF(CLOSE,1);
STICKLINE(tj and CLOSE>MA18,HIGH,LOW,0.1,0),colorred;
STICKLINE(tj and CLOSE>MA18,CLOSE,OPEN,7,0),colorred;
STICKLINE(NOT(tj) and CLOSE>MA18,HIGH,LOW,0.1,0),colorcyan;
STICKLINE(NOT(tj) and CLOSE>MA18,CLOSE,OPEN,7,0),colorcyan;
STICKLINE(tj and CLOSE<MA18,HIGH,LOW,0.1,0),colorred;
STICKLINE(tj and CLOSE<MA18,CLOSE,OPEN,7,1),colorred;
STICKLINE(NOT(tj) and CLOSE<MA18,HIGH,LOW,0.1,0),colorcyan;
STICKLINE(NOT(tj) and CLOSE<MA18,CLOSE,OPEN,7,1),colorcyan;
|