gspt1:=HIGH;
趋势:3*SMA((CLOSE-LLV(LOW,27))/(HHV(gspt1,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(gspt1,27)-LLV(LOW,27))*100,5,1),3,1),COLORFF00FF,LINETHICK3;
买:IF(趋势<=10,15,0),LINETHICK2,COLORFF00FF;
DRAWTEXT(趋势<=10,10,'买'),COLORFF00FF;
gspt2:=HHV(gspt1,9)-LLV(LOW,9);
gspt3:=HHV(gspt1,9)-CLOSE;
gspt4:=CLOSE-LLV(LOW,9);
gspt5:=gspt3/gspt2*100-70;
gspt6:=(CLOSE-LLV(LOW,60))/(HHV(gspt1,60)-LLV(LOW,60));
gspt7:=(2*CLOSE+gspt1+LOW)/4;
gspt8:=SMA(gspt4/gspt2*100,3,1);
gspt9:=LLV(LOW,34);
gspt10:=SMA(gspt8,3,1)-SMA(gspt5,9,1);
gspt11:=IF(gspt10>100,gspt10-100,0);
gspt12:=HHV(gspt1,34);
gspt13:=EMA((gspt7-gspt9)/(gspt12-gspt9)*100,13);
gspt14:=EMA(0.667*REF(gspt13,1)+0.333*gspt13,2);
DRAWBAND(gspt13,RGB(255,0,0),gspt14,RGB(256,200,0));
A1:=HHV(gspt1,50)/LLV(LOW,100)>1.5;
gspt15:=(HHV(gspt1,50)-LOW)/(HHV(gspt1,50)-LLV(LOW,100));
gspt16:=(LOW-LLV(LOW,100))/(HHV(gspt1,50)-LLV(LOW,100));
gspt17:=HHVBARS(gspt1,50)< LLVBARS(LOW,100);
gspt18:=A1 AND gspt15>0.5 AND gspt16>0.3 AND gspt17;
gspt19:=COUNT(gspt18,20)=1;
抢反弹:gspt19 AND gspt18;
STICKLINE(抢反弹,0,20,4,0),COLOR009999;
STICKLINE(抢反弹,0,20,2,0),COLOR00BBBB;
STICKLINE(抢反弹,0,20,1,0),COLOR00DDDD;
STICKLINE(抢反弹,0,20,0.4,0),COLOR00FFFF;
DRAWTEXT(抢反弹,22,'抢反弹'),COLOR00BBFF;
gspt20:=100-100*(HHV(gspt1,14)-CLOSE)/(HHV(gspt1,14)-LLV(LOW,14));
gspt21:=EMA(gspt20,3);
gspt22:=EMA(gspt20,7);
gspt23:=EMA(gspt22,5);
gspt24:=CROSS(gspt21,gspt23) AND gspt23< 20;
潜伏:IF((gspt24),20,0),LINETHICK2,COLORRED;
DRAWTEXT(CROSS(gspt21,gspt23) AND gspt23< 20,22,' ★潜伏'),COLORYELLOW;
卖出:IF(趋势>=98,85,95),LINETHICK3,COLORFF0000;
DRAWTEXT(趋势>=98,85,'卖出'),COLORFF0000;
买入:买 AND 潜伏;
STICKLINE(买入,0,30,4,0),COLOR000099;
STICKLINE(买入,0,30,2,0),COLOR0000BB;
STICKLINE(买入,0,30,1,0),COLOR0000DD;
STICKLINE(买入,0,30,0.4,0),COLOR0000FF;
DRAWTEXT(买入,35,'买入'),COLORFFFFFF;
gspt25:=CROSS(趋势,gspt13) AND gspt13< 60;
DRAWICON(gspt25,gspt13,23);
DRAWTEXT(gspt25,趋势,' 启动'),COLORFFFFFF;