If there is no Function: BollingerBand in Multicharts, I will add it in the code
------------------------------------------------------------------------------------------------
Inputs: bollingerLengths(50),liqLength(50),rocCalcLength(30);
Vars: upBand(0),dnBand(0),liqDays(50),rocCalc(0);
upBand = BollingerBand(Close,bollingerLengths,1.25);
dnBand = BollingerBand(Close,bollingerLengths,-1.25);
rocCalc = Close - Close[rocCalcLength-1]; {remember to subtract 1}
if(MarketPosition <> 1 and rocCalc > 0) then Buy("BanditBuy")tomorrow upBand
stop;
if(MarketPosition <>-1 and rocCalc < 0) then SellShort("BanditSell") tomorrow
dnBand stop;
if(MarketPosition = 0) then liqDays = liqLength;
if(MarketPosition <> 0) then
begin
liqDays = liqDays - 1;
liqDays = MaxList(liqDays,10);
end;
if(MarketPosition = 1 and barssinceentry>=6 and Average(Close,liqDays) < upBand) then
Sell("Long Liq") tomorrow Average(Close,liqDays) stop;
if(MarketPosition = -1 and barssinceentry>=6 and Average(Close,liqDays) > dnBand) then
BuyToCover("Short Liq") tomorrow Average(Close,liqDays) stop;