Var1:=SLOPE(MA(CLOSE,21),3);
Var2:=((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*100;
Var3:MA(100*(C-LLV(C,34))/(HHV(H,34)-LLV(L,34)),5)-10;
Var4:SMA(100*(C-LLV(L,55))/(HHV(H,55)-LLV(L,55)),13,1)-10;
Var5:=(CLOSE-LLV(LOW,90))/(HHV(HIGH,90)-LLV(LOW,90))*100;
DRAWICON(CROSS(Var3,Var4)AND Var4<20,Var4,1);
DRAWTEXT(COUNT(Var1<0,10)=9 AND CROSS(Var1,0),30,'追涨');
Var6:=LLVBARS(Var5,90);
Var7:=WINNER(C)*100;
建仓等待区:Var6<5 AND Var7<20 OR Var6<40 AND Var7<2,colorf00ff0,LINETHICK0;
STICKLINE(建仓等待区,0,10,8,0),colorf00ff0;
安全区:Var4<20,COLORFFFF00,LINETHICK0;
STICKLINE(安全区,Var4,20,8,1),COLORFFFF00;
Var8:=COST(10);
Var9:=(CLOSE-Var8)/Var8*100;
关注: IF(COUNT(Var9<-2,3)=3,20,0),COLORFF0000,LINETHICK2;
Var10:=SMA(Var2,3,1);
Var11:=SMA(Var10,3,1);
Var12:=CROSS(Var10,Var11) AND Var11<20;
DRAWTEXT(建仓等待区 AND Var12,25,'可买');
DRAWTEXT(FILTER(安全区 AND Var12,5),25,'买');
STICKLINE(建仓等待区 AND Var12 AND 安全区,25,0,8,1);