上线=sma(close,6.5,1);
下线=sma(close,13.5,1);
上线界=sma(close,3,1);
下线界=sma(close,8,1);
drawStickBetweenIf(上线 > 下线,上线,下线,color="red",fill=true,linewidth=2.5);
drawStickBetweenIf(下线 > 上线,上线,下线,color="green",fill=true,linewidth=2.5);
drawText(isCrossUp(上线,下线),low * 0.98,"全仓买入",color="yellow");
drawText(isCrossUp(下线界,上线界),high * 1.02,"清仓",color="yellow");
bbi=(ma(close,3) + ma(close,6) + ma(close,12) + ma(close,24)) / 4;
upr=bbi + 3 * std(bbi,13);
dwn=bbi - 3 * std(bbi,13);
安全=ma(close,60);
lc=refBefore(close,1);
rsi=sma(max(close - lc,0),6,1) / sma(abs(close - lc),6,1) * 100;
a7=(2 * close + high + low) / 4;
操作=ma(a7,5);
draw(操作,color="white");
操作界=ma(a7,5) * 1.03;
操作界限=ma(a7,5) * 0.97;
var1=lowest(a7,21);
draw(var1,color="white");
var2=highest(a7,21);
draw(var2,color="white");
sk=ema((a7 - var1) / (var2 - var1) * 100,7);
sd=ema(0.667 * refBefore(sk,1) + 0.333 * sk,5);
drawText(ifelse(count(close < refBefore(close,1),8) / 8 > 6 / 10 && vol >= 1.5 * ma(vol,5) && count(sk >= sd,3) && refBefore(low,1) == lowest(low,120),1,0),low * 0.98,"买进",color="#0099ff");
drawText(ifelse(count(close < refBefore(close,1),13) / 13 > 6 / 10 && count(sk > sd,6) && refBefore(low,5) == lowest(low,120) && refBefore(close >= open,4) && refBefore(close > open,3) && refBefore(close > open,2) && refBefore(open > close,1) && open > refBefore(close,1),1,0),low * 0.98,"买进",color="yellow");
d=ma(close,80) - ma(close,10) / 3;
drawText(ifelse(close < d && vol / 240 > ma(vol,5) / 240 && close > refBefore(close,1) * 1.08 && close < ma(close,13) * 1.3,1,0),low * 0.98,"抄底",color="yellow");