GSPT1:=(CLOSE-LLV(LOW,7))/(HHV(HIGH,7)-LLV(LOW,7))*100;
GSPT2:=(CLOSE-LLV(LOW,38))/(HHV(HIGH,38)-LLV(LOW,38))*100;
GSPT3:=MAX(DYNAINFO(3),DYNAINFO(5));
GSPT4:=MIN(DYNAINFO(3),DYNAINFO(6));
GSPT5:=((GSPT4+(GSPT3-GSPT4)*0.5/8)+(GSPT4+(GSPT3-GSPT4)*7/8))/2;
GSPT6:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1);
GSPT7:=GSPT6-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);
短K:SMA(GSPT1,3,1),COLORYELLOW;
短D:SMA(短K,3,1),COLOR66CC33;
长K:SMA(GSPT2,5,1),COLORRED;
长D:SMA(长K,10,1),COLORCYAN;
STICKLINE(长K>长D,长K,长D,2,0),COLORRED;
STICKLINE(长K<=长D,长K,长D,2,0),COLORCYAN;
STICKLINE(短K>短D,短K,短D,2,0),COLORYELLOW;
STICKLINE(短K<=短D,短K,短D,2,0),COLOR66CC33;
趋势线:EMA(GSPT7,3),COLORLIMAGENTA,NODRAW;
GSPT8:=(趋势线<11) AND FILTER((趋势线<=11),15) AND C<GSPT5;
GSPT9:=REF(趋势线,1)<11 AND REF(趋势线,1)>6 AND CROSS(趋势线,11);
GSPT10:=REF(趋势线,1)<6 AND REF(趋势线,1)>3 AND CROSS(趋势线,6);
GSPT11:=REF(趋势线,1)<3 AND REF(趋势线,1)>1 AND CROSS(趋势线,3);
GSPT12:=REF(趋势线,1)<1 AND REF(趋势线,1)>0 AND CROSS(趋势线,1);
GSPT13:=REF(趋势线,1)<0 AND CROSS(趋势线,0);
GSPT14:=GSPT9=1 OR GSPT10=1 OR GSPT11=1 OR GSPT12=1 OR GSPT13=1;
GSPT15:=(趋势线>89) AND FILTER((趋势线>89),15) AND C>GSPT5;
GSPT16:=REF(趋势线,1)>89 AND REF(趋势线,1)<94 AND CROSS(89,趋势线);
GSPT17:=REF(趋势线,1)>94 AND REF(趋势线,1)<97 AND CROSS(94,趋势线);
GSPT18:=REF(趋势线,1)>97 AND REF(趋势线,1)>99 AND CROSS(97,趋势线);
GSPT19:=REF(趋势线,1)>99 AND REF(趋势线,1)<100 AND CROSS(99,趋势线);
GSPT28:=REF(趋势线,1)>100 AND CROSS(100,趋势线);
GSPT29:=GSPT16=1 OR GSPT17=1 OR GSPT18=1 OR GSPT19=1 OR GSPT28=1;
STICKLINE(趋势线<11,趋势线,11,5,0),COLORYELLOW;
STICKLINE(GSPT14=1 AND C<GSPT5,11,50,5,0),COLORRED;
DRAWTEXT(GSPT8,16,'准备买入'),COLORYELLOW;
STICKLINE(趋势线>89,趋势线,89,5,0),COLORWHITE;
STICKLINE(GSPT29=1 AND C>GSPT5,89,50,5,0),COLORGREEN;
DRAWTEXT(GSPT15,84,'准备卖出'),COLORWHITE;