VAR2:MA(CLOSE,13),COLOR00FF33;
VAR7:((EMA(CLOSE,5)*7+EMA(CLOSE,5)*3)/10),COLORBBBBBB;
{STICKLINE(VAR7>VAR2,VAR2,VAR7,0.01,1),COLORFF00FF;
STICKLINE(VAR7<VAR2,VAR2,VAR7,0.01,1),COLOR33FF33;}
DRAWBAND(VAR2,RGB(25,255,10),VAR7,RGB(255,10,10));
Z1撑7:=STRCAT(HYBLOCK,' ');
Z2撑7:=STRCAT(Z1撑7,DYBLOCK);
Z3撑7:=STRCAT(Z2撑7,' ');
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3撑7,GNBLOCK)),COLOR00C0C0;
A1撑7:=REF(H,N撑7)=HHV(H,2*N撑7+1);
B1撑7:=FILTER(A1撑7,N撑7);
C1撑7:=BACKSET(B1撑7,N撑7+1);
D1撑7:=FILTER(C1撑7,N撑7);
A2撑7:=REF(L,N撑7)=LLV(L,2*N撑7+1);
B2撑7:=FILTER(A2撑7,N撑7);
C2撑7:=BACKSET(B2撑7,N撑7+1);
D2撑7:=FILTER(C2撑7,N撑7);
E1撑7:=(REF(LLV(L,2*N撑7),1)+REF(HHV(H,2*N撑7),1))/2;
E2撑7:=(H+L)/2;
H1撑7:=(D1撑7 AND NOT(D2撑7 AND E1撑7>=E2撑7)) OR ISLASTBAR OR BARSCOUNT(C)=1;
L1撑7:=(D2撑7 AND NOT(D1撑7 AND E1撑7<E2撑7));
H2撑7:=D1撑7 AND NOT(D2撑7 AND E1撑7>=E2撑7);
X1撑7:=REF(BARSLAST(H1撑7),1)+1;
F1撑7:=BACKSET(H1撑7 AND COUNT(L1撑7,X1撑7)>0,LLVBARS(IF(L1撑7,L,10000),X1撑7));
G1撑7:=F1撑7>REF(F1撑7,1);
I1撑7:=BACKSET(G1撑7,2);
LD撑7:=I1撑7>REF(I1撑7,1);
L2撑7:=LD撑7 OR ISLASTBAR OR BARSCOUNT(C)=1;
X2撑7:=REF(BARSLAST(L2撑7),1)+1;
F2撑7:=BACKSET(L2撑7 AND COUNT(H2撑7,X2撑7)>0,HHVBARS(IF(H2撑7,H,0),X2撑7));
G2撑7:=F2撑7>REF(F2撑7,1);
I2撑7:=BACKSET(G2撑7,2);
HD撑7:=I2撑7>REF(I2撑7,1);
R1撑7:=BACKSET(ISLASTBAR,BARSLAST(HD撑7)+1);
S1撑7:=R1撑7>REF(R1撑7,1);
T1撑7:=BACKSET(ISLASTBAR,BARSLAST(LD撑7)+1);
U1撑7:=T1撑7>REF(T1撑7,1);
R2撑7:=BACKSET(S1撑7,REF(BARSLAST(HD撑7),1)+2);
S2撑7:=R2撑7>REF(R2撑7,1);
T2撑7:=BACKSET(U1撑7,REF(BARSLAST(LD撑7),1)+2);
U2撑7:=T2撑7>REF(T2撑7,1);
NOTEXT1撑7:DRAWLINE(S2撑7,H,S1撑7,H,1),LINETHICK2,COLORRED;
NOTEXT2撑7:DRAWLINE(U2撑7,L,U1撑7,L,1),LINETHICK2,COLORGREEN;
左谷:REF(L,BARSLAST(U2撑7)),LINETHICK2;
左峰:REF(H,BARSLAST(S2撑7)),LINETHICK2;
DRAWKLINE(H,O,L,C);
{涨跌提示}
涨停:=IF((C-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(C,1)),1,0);
STICKLINE(涨停,OPEN,CLOSE,1.5,0),COLORYELLOW;
跌停:=IF((REF(C,1)-C)*100/REF(C,1)>=(10-0.01*100/REF(C,1)),1,0);
STICKLINE(跌停,OPEN,CLOSE,1.5,0),COLORWHITE; |