N1:=10;
S:=CROSS(CLOSE,EMA(HIGH,30));
X:=CROSS(EMA(LOW,30),CLOSE);
WS:=BARSLAST(S)+1;
WX:=BARSLAST(X)+1;
SS:=CROSS(SUM(S,WX),0.5);
XX:=CROSS(SUM(X,WS),0.5);
PARTLINE(CLOSE>EMA(HIGH,30),EMA(HIGH,30)),colorred,LINETHICK1;
PARTLINE(CLOSE<EMA(HIGH,30),EMA(HIGH,30)),colorgreen,LINETHICK1;
PARTLINE(CLOSE>EMA(LOW,30),EMA(LOW,30)),colorred,LINETHICK1;
PARTLINE(CLOSE<EMA(LOW,30),EMA(LOW,30)),colorgreen,LINETHICK1;
PARTLINE(CLOSE>EMA(HIGH,150),EMA(HIGH,150)),COLORMAGENTA,LINETHICK1;
PARTLINE(CLOSE<EMA(HIGH,150),EMA(HIGH,150)),colorblue,LINETHICK1;
PARTLINE(CLOSE>EMA(LOW,150),EMA(LOW,150)),COLORMAGENTA,LINETHICK1;
PARTLINE(CLOSE<EMA(LOW,150),EMA(LOW,150)),colorblue,LINETHICK1;
STICKLINE(C>=O ,O ,C ,9 ,1 ),colorred;
STICKLINE(O> C ,C ,O ,8 ,1 ),colorwhite;
STICKLINE(C>=O ,C ,H ,0.5 ,1 ),colorred;
STICKLINE(C>=O ,O ,L ,0.5 ,1 ),colorred;
STICKLINE(O> C ,C ,L ,0.5 ,1 ),colorwhite;
STICKLINE(O> C ,O ,H ,0.5 ,1 ),colorwhite;
趋势线:=3*SMA((CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
底部:=llv(c,30);ma3:=ma(底部,2);x:=ma(c,26);
压力:=hhv(h,30),ColorF8EE00;
varA:=((AMOUNT)/(VOL))/(100);
varB:=((3)*(HIGH)+LOW+OPEN+(2)*(CLOSE))/(7);
varC:=((SUM(AMOUNT,7))/(varA))/(100);
varD:=DMA(varB,(VOL)/(varC));
varE:=((CLOSE-varD)/(varD))*(100);
varF:=((CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)))*(100);
varJ:=MA(varE,20)+STD(varE,20);
BIAS18:=((CLOSE-MA(CLOSE,18))/(MA(CLOSE,18)))*(100);
K:=SMA(varF,3,1);
顶:=(REF(BIAS18,1)>=5) AND CROSS(varJ,varE) AND (K>79);
HH:=HHV(HIGH,N1);
LL:=LLV(LOW,N1);
HH1:=BARSLAST((HH > REF(HH,1)));
LL1:=BARSLAST((LL < REF(LL,1)));
DRAWICON(CROSS(HH1,LL1),HH,13);
DRAWICON(CROSS(LL1,HH1),LL,15);
DRAWTEXT(CROSS(HH1,LL1),HH,'卖'),colorgreen;
DRAWTEXT(CROSS(LL1,HH1),LL,'买'),colorFF00FF;
n:=21;
TY:=C;
A1:=REF(TY,N)=HHV(TY,2*N+1);
B1:=FILTER(A1,N);
C1:=BACKSET(B1,N+1);
HD:=FILTER(C1,N);
A2:=REF(TY,N)=LLV(TY,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) and BARSLAST(LD) AND NOT(LD);
STICKLINE(t1,A,A,9,0),ColorFF00FF,LINETHICK2;
STICKLINE(t1,B,B,9,0),Color00FF00,LINETHICK2;
HH:HHV(H,450),COLOR53ff53,LINETHICK2;
LL:LLV(L,450),colorwhite,LINETHICK2;
VAR1:=(HH-LL);