DRAWTEXT(CROSS(VA2,VA1),VA1*1.10,'止损'),ALIGN1,COLORyellow;
DRAWTEXT(CROSS(VA1,VA2)AND(C>=O)AND 智能黄金线>REF(智能黄金线,1),VA1*0.98,'★买入'),COLOR00FF00;
选手A:=MA(上收,3);
箱顶A:=MA(REF(HHV(上收,6),1),3);
箱底A:=MA(REF(LLV(上收,3),1),3);
t1:=MA(上收,20)>=REF(MA(上收,20),1);
t2:=CROSS(选手A,箱底A) AND 箱顶A/箱底A>100/100 AND t1;
t3:=CROSS(箱顶A,选手A) AND 箱顶A/箱底A>100/100;
选手:=MA(上收,2);
箱顶:MA(REF(HHV(上收,30),1),2),COLOR0000FF,LINETHICK2;
箱底:MA(REF(LLV(上收,30),1),2),COLOR00FF00,LINETHICK2;
t4:=CROSS(选手,箱底) AND 箱顶/箱底>110/100;
t5:=CROSS(箱顶,选手) AND 箱顶/箱底>110/100;
Var1:=(上收-LLV(上低,27))/(HHV(上高,27)-LLV(上低,27))*100;
Var2:=SMA(Var1,3,1);
Var3:=SMA(Var2,3,1);
Var4:=SMA(Var3,3,1);
DRAWTEXT(Var3 >=Var4 and BARSTATUS=2,箱顶,'--中期好'),COLOR00FFFF;
DRAWTEXT( Var3<Var4 and BARSTATUS=2,箱顶,'--中期坏'),COLORf0f000;
DRAWTEXT( A>B and BARSTATUS=2,箱底,'--短期好'),COLOR00FFFF;
DRAWTEXT(A<B and BARSTATUS=2,箱底,'--短期坏'),COLORf0f000;
mms:=ma(sma((l+h+2*c)/4-ref((l+h+2*c)/4,1),5,1)/sma(abs((l+h+2*c)/4-ref((l+h+2*c)/4,1)),5,1)*100,1)+50;
g1:=if(-mms>95,0,20);
uoo:=(-(((CLOSE-LLV(CLOSE,7))/(HHV(CLOSE,7)-LLV(CLOSE,7))*100=100)>0 and g1)+1);
DRAWTEXT(CROSS(Var3,Var4)AND(C>=O)AND Var3<40 AND uoo>0,箱底,'★'),ALIGN0,COLORf00ff0;
DRAWTEXT(CROSS(Var4,Var3) AND Var4>75 ,箱顶*1.03,'★减磅'),COLORf0f000;
{K线}
STICKLINE(C>=O,C,O,7,0),COLORRED;
STICKLINE(C>=O,C,O,4,0),COLORB0B0FF;