MID:=MA(CLOSE,21),COLORWHITE;
UPPER:=MID + 1.96*stD(CLOSE,21),COLORYELLOW;
LOWER:=MID - 1.96*STD(CLOSE,21),COLORYELLOW;
UP:=MID + 2.58*STD(CLOSE,21),COLORFF00FF;
LOOW:=MID - 2.58*STD(CLOSE,21),COLORFF00FF;
单边上升:=(C>MID);
单边下降:=(C<MID);
布林线开口:=UP-LOOW;
多头行情:=C>MA(C,5) AND MA(C,5)>MA(C,10);
适当建仓:=(单边上升 AND FILTER(多头行情,20) AND V>MA(V,3));
空仓:=(crOSS(MID,AMOUNT/V/100));
加仓:=(单边上升 AND REF(C-MID,1)=LLV(C-MID,5));
加仓XG:加仓 AND BArslAST(适当建仓)<BARSLAST(空仓);