短线成本:=EMA(CLOSE,17),LINETHICK2,colorwhite;
A:=(3*C+L+O+H)/6;
X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+ 14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12) +7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+ REF(A,20))/210;
中线成本:=EMA(X,13),LINETHICK2,COLORFF00FF;
STICKLINE(BARSLAST(短线成本<中线成本)>30,95,100,5,0),colorred;
STICKLINE(BARSLAST(短线成本>中线成本)>30,0,5,5,0),colorgreen;
VAR1:=1;
VAR2:=LLV(LOW,10);
VAR3:=HHV(HIGH,25);
N1:=5;
N4:=34;
CQ:=100*(C-LLV(L,N4))/(HHV(C,N4)-LLV(L,N4));
SAT:=(AMOUNT/C)/(HHV(AMOUNT,N4)/HHV(C,N4));
饱和度:=IF(SAT>1,1,SAT)*100;
W1:=C=HHV(C,20);
W2:=BARSLAST(W1);
W3:=IF(W2>0,REF(C,W2),REF(C,W2));
W4:=CROSS(C,REF(W3,1));
STICKLINE(饱和度>=97 AND CQ>90,0,100,2,0),colorred;
中期:=100*(C-LLV(L,N4))/(HHV(C,N4)-LLV(L,N4));
持股:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
支撑:=LLV(持股,3);
短期线:EMA((CLOSE-VAR2)/(VAR3-VAR2)*4,4)*VAR1*30,LINETHICK2,colorgreen;
中期线:MA(持股,12),colorwhite,LINETHICK2;
STICKLINE(支撑<中期线,支撑,中期线,2,0),COLOR6B8E23;
STICKLINE(持股>0,支撑,持股,2,0),colorred;
STICKLINE(支撑>中期线,中期线,支撑,2,0),COLOR38B0DE;
STICKLINE(支撑=持股 AND 持股>中期线,中期线,支撑,2,0),COLORFF00FF;
STICKLINE(REF(中期,1)<1 AND 中期>1,0,15,2,0),colorwhite;
STICKLINE(W4 AND COUNT(W4,5)=1,85,100,2,0),coloryellow;
底部线:0,colorwhite;
警戒线:85,coloryellow;
卖出线:100,colorred;
DRAWTEXT(CROSS(短期线,中期线),短期线,'始');
DRAWTEXT(短期线>90,短期线,'终');