N:=5;
MA250:=MA(CLOSE,250),COLORMAGENTA,LINETHICK3;
{N(3,30,5);}
【箱顶】:PEAK(3,N,1)*0.999;
【箱底】:TROUGH(3,N,1)*0.999;
【箱高】:=1*(【箱顶】-【箱底】)/【箱底】;
K线运行的升幅:=(MA(H,3)-REF(MA(H,3),1))*100/REF(MA(H,3),1);{NODRAW;}
{ML:=EMA(L,7),COLORMAGENTA;
MH:=MA(H,7),COLORGRAY;
趋势线:MA((MH+ML)/2,3),LINETHICK1,COLORGREEN;
趋势线1:IF(趋势线>REF(趋势线,1),趋势线,DRAWNULL),LINETHICK2,COLORMAGENTA;}
{八周均线}
VAR1:MA(C,7),COLORGREEN;
VAR1A:IF(VAR1>REF(VAR1,1),VAR1,DRAWNULL),COLORRED;
DRAWICON(CROSS(C,VAR1),L*0.99,1);
DRAWICON(CROSS(VAR1,C),H*1.00,2);
XDU:=IF(EMA(EMA(EMA(C,2),2),2)>REF(EMA(EMA(EMA(C,2),2),2),1),【箱底】,【箱顶】);
XTB:=【箱底】!=REF(【箱底】,2) &&【箱底】=REF(【箱底】,1);
XTS:=【箱顶】!=REF(【箱顶】,2) &&【箱顶】=REF(【箱顶】,1);
买点:=(【箱底】!=REF(【箱底】,2) && 【箱底】=REF(【箱底】,1));
卖点:=(【箱顶】!=REF(【箱顶】,2) && 【箱顶】=REF(【箱顶】,1));
DRAWICON(XTB,MIN(【箱底】,L)*0.979,1);
DRAWTEXT(XTB,MIN(【箱底】,L)*0.977,'[到底了,抢钱!]'),COLOR0000DD;
DRAWICON(XTS,MAX(【箱顶】,H)*1.018,2);
DRAWTEXT(XTS,MIN(【箱顶】,H)*1.028,'[到顶了,快跑!]')COLOR00DD00;