gspt1:=3;
gspt2:=MA(C,5);
gspt3:MA(C,20),COLORGREEN;
gspt4:IF(gspt2>gspt3,gspt3,gspt2),COLORRED;
gspt5:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100;
gspt6:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
gspt7:=gspt6-gspt5;
gspt8:=MA(gspt7,gspt1);
DRAWCOLORKLINE(gspt8>=0 AND C>=O,COLORRED,1);
DRAWCOLORKLINE(gspt8>=0 AND C< O,COLORRED,0);
DRAWCOLORKLINE(gspt8< 0 AND C>=O,COLORCYAN,1);
DRAWCOLORKLINE(gspt8< 0 AND C< O,COLORCYAN,0);
DRAWCOLORKLINE(gspt8< 0 AND C>=O AND gspt3< C,COLORYELLOW,0);
DRAWCOLORKLINE(gspt8< 0 AND C< O AND gspt3< C,COLORYELLOW,0);
DRAWCOLORKLINE(gspt8>=0 AND C>=O AND gspt3>C,COLORBLUE,0);
DRAWCOLORKLINE(gspt8>=0 AND C< O AND gspt3>C,COLORBLUE,0);
gspt9:=(MA(CLOSE,4)+MA(CLOSE,8)+MA(CLOSE,16)+MA(CLOSE,32))/4;
gspt10:=MA((2*CLOSE+HIGH+LOW)/4,5);
gspt11:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
gspt12:=DMA(CLOSE,gspt11);
(1+7/100)*gspt12,CIRCLEDOT,COLORYELLOW;
(1-7/100)*gspt12,CIRCLEDOT,COLOR0099FF;
gspt13:=(L+H+C*2)/4;
gspt14:=EMA(gspt13,9),COLORWHITE,LINETHICK1;
gspt15:=EMA(gspt13,20),COLORYELLOW,LINETHICK1;
gspt16:=(gspt14-REF(gspt14,1))/REF(gspt14,1)*100,NODRAW;
gspt17:=(gspt15-REF(gspt15,1))/REF(gspt15,1)*100,NODRAW;
gspt18:=MA(C,11);
(1+13.7/100)*gspt12,COLORYELLOW,LINETHICK1;
(1-13.7/100)*gspt12,COLORRED,LINETHICK1;
gspt19:=MA(CLOSE,18);
gspt20:=C-REF(C,1);
gspt21:=100*EMA(EMA(gspt20,7),7)/EMA(EMA(ABS(gspt20),7),7);
gspt22:=LLV(gspt21,3)=LLV(gspt21,8) AND COUNT(gspt21< 0,2) AND CROSS(gspt21,MA(gspt21,2));
DRAWTEXT(FILTER(gspt22=1,5),LOW,'★买'),COLORYELLOW,VALIGN0;
gspt23:=HHV(gspt21,2)=HHV(gspt21,7) AND COUNT(gspt21>50,2) AND CROSS(MA(gspt21,2),gspt21);
DRAWTEXT(FILTER(gspt23=1,1),HIGH,'★卖'),COLORGREEN,VALIGN2;