```
# Consolidation Box Barebones - with Grey Consolidation Box
# tomsk
# 11.23.2019
# As requested by Playstation, this is B3 Consolidation Box with all lines removed
# Only the grey consolidation box remains
# B3 Consolidation Box
# Hammond B3
# 2.2.2019
input BarsUsedForRange = 2;
input BarsRequiredToRemainInRange = 7;
input ColorPrice = yes;
input HideBoxLines = no;
input HideLabels = no;
# Identify Consolidation
def HH = highest(high[1], BarsUsedForRange);
def LL = lowest(low[1], BarsUsedForRange);
def maxH = highest(hh, BarsRequiredToRemainInRange);
def maxL = lowest(ll, BarsRequiredToRemainInRange);
def HHn = if maxH == maxH[1] or maxL == maxL then maxH else HHn[1];
def LLn = if maxH == maxH[1] or maxL == maxL then maxL else LLn[1];
def Bh = if high <= HHn and HHn == HHn[1] then HHn else double.nan;
def Bl = if low >= LLn and LLn == LLn[1] then LLn else double.nan;
def CountH = if isnan(Bh) or isnan(Bl) then 2 else CountH[1] + 1;
def CountL = if isnan(Bh) or isnan(Bl) then 2 else CountL[1] + 1;
def ExpH = if barnumber() == 1 then double.nan
else if CountH[-BarsRequiredToRemainInRange] >= BarsRequiredToRemainInRange then HHn[-BarsRequiredToRemainInRange]
else if High <= ExpH[1] then ExpH[1]
else double.nan;
def ExpL = if barnumber() == 1 then double.nan
else if Countl[-BarsRequiredToRemainInRange] >= BarsRequiredToRemainInRange then LLn[-BarsRequiredToRemainInRange]
else if Low >= ExpL[1] then ExpL[1] else double.nan;
# Plot the High and Low of the Box; Paint Cloud
plot BoxHigh = if !isnan(expL) and !isnan(ExpH) then ExpH else double.nan;
boxhigh.setdefaultColor(color.dark_green);
BoxHigh.setpaintingStrategy(paintingStrategy.HORIZONTAL);
BoxHigh.SETHIDING(HideBoxLines);
plot BoxLow = if !isnan(expL) and !isnan(ExpH) then ExpL else double.nan;
BoxLow.setpaintingStrategy(paintingStrategy.HORIZONTAL);
BoxLow.setdefaultColor(color.dark_red);
BoxLow.SETHIDING(HideBoxLines);
addcloud(BoxHigh, BoxLow, color.gray, color.gray);
# Things to the Right of a Finished Box
def eH = if barnumber() == 1 then double.nan else if !isnan(BoxHigh[1]) and isnan(BoxHigh) then BoxHigh[1] else eh[1];
def eL = if barnumber() == 1 then double.nan else if !isnan(BoxLow[1]) and isnan(BoxLow) then BoxLow[1] else el[1];
assignPriceColor(if !ColorPrice then color.current else if !isnan(BoxHigh) then color.gray else
if high > eh and low < el then color.yellow else
if high > eh then color.green else if low < el then color.red else color.gray);
# Consolidation Box Barebones
```