Bollinger Bandwidth Highest High and Low Show Plot

I’m trying to plot the 6mth high and low on Bollinger Bandwidth using the following script.

//Calculate Bollinger Band Width
BollingerBandwidth=BBW(BARS=20);

//Lowest Low of Bollinger Bandwith with 6 month Look Back
LowestlowBBW = LOWESTLOW(BollingerBandwidth, Month(PERIODAMOUNT=1), BARS=6, INSIDEBAR=False, INCBAR=False, EQUAL=True);

//Highest High of Bollinger Bandwidth with 6 month Look Back
HighesthighBBW = HIGHESTHIGH(BollingerBandwidth, Month(PERIODAMOUNT=1), BARS=6, INSIDEBAR=False, INCBAR=False, EQUAL=True);

//Plot High and Low BBW
plot1 =  HighesthighBBW;
plot1.Colour = Red;

plot2 = LowestlowBBW;
plot2.Colour = Green;

Thanks

Tim

Hi Tim,

Your script is using 6 monthly data, not a 6 month lookback on daily data. Try this to calculate the 6m low and high:

image

//Lowest Low of Bollinger Bandwith with 6 month Look Back
LowestlowBBW = LOWESTLOW(BollingerBandwidth, BACKTYPE=Months, BARS=6);

//Highest High of Bollinger Bandwidth with 6 month Look Back
HighesthighBBW = HIGHESTHIGH(BollingerBandwidth, BACKTYPE=Months, BARS=6);

Alternatively, apply a Show Plot on any tool using this:

Plot1=HIGHESTHIGH(BACKTYPE=Months, BARS=6, INCBAR=True);
Plot1.Colour = Red;
Plot2=LOWESTLOW(BACKTYPE=Months, BARS=6, INCBAR=True);
Plot2.Colour = Green;