n:=24;
bc:=(IF(C>(H+L+C)/3,(H*0.618+L*0.382)*0.382,(H*0.382+L*0.618)*0.382)+(O*0.382+C*0.618)*0.618);
多:(bc-MA(bc,n))/((2*N/1000)*AVEDEV(BC,n)),COLOR6600FF;
空:-(c-MA(C,n))/((2*N/1000)*AVEDEV(C,n)),COLORAAAA00;
FILLRGN(多<空,多,空),COLORFF0080;
FILLRGN(多>空,多,空),COLOR6600FF;
STICKLINE(C>0,100,100,10,0),COLOR00bb00;
STICKLINE(C>0,75,75,3,0),COLORWHITE;
STICKLINE(C>0,50,50,6,0),COLORMAGENTA;
STICKLINE(C>0,0,0,6,0),COLORYELLOW;
STICKLINE(C>0,-50,-50,6,0),COLORMAGENTA;
STICKLINE(C>0,-100,-100,10,0),COLOR00bb00;
STICKLINE(C>0,-75,-75,3,0),COLORWHITE;
DL:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*(n*10)-(n*10/2);
K:SMA(DL,N/3,1),COLORWHITE,POINTDOT;
D:EMA(K,3),COLORYELLOW,POINTDOT;
FILLRGN(K>=D,K,D),COLORBROWN;
FILLRGN(K<D,K,D),COLORGRAY;
LC:=REF(BC,1);
rsi:SMA(MAX(BC-LC,0),N,1)/SMA(Abs(BC-LC),N,1)*(N*10)-(N*10/2),COLORSTICK,COLORCYAN;
B1:=if(K>=0 AND K>D,2,IF(k<0 AND K>D,1,0));
B2:=if(多>=空,2,0);
B3:=if(rsi>=0,2,0);
共振:(B1+B2+B3),LINETHICK;
PARTLINE(共振=1,0),COLORWHITE,CIRCLEDOT;
PARTLINE(共振>=3,0),COLORYELLOW,CIRCLEDOT;
PARTLINE(共振>=5,0),COLORBROWN,CIRCLEDOT;
DRAWTEXT(crOSS(共振,2.5),-15,'买'),COLORWHITE,ALIGN0;
DRAWTEXT(CROSS(共振,4.5),25,'追'),COLORYELLOW,ALIGN0;
超卖:STICKLINE(K<-80,K,-75,0,0),COLORYELLOW;
STICKLINE(K<-100,K,-100,5,0),COLORMAGENTA;
超买:STICKLINE(K>80,K,75,3,0),COLORRED;
STICKLINE(K>100,K,100,5,0),COLORBLUE;