Here is the code:
def insideBar = high < high[1] and low > low[1];
AssignPriceColor(if insideBar then Color.WHITE else Color.CURRENT);
plot insideHigh = if insideBar then high else if insideBar[1] then high[1] else Double.NaN;
insideHigh.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
insideHigh.SetDefaultColor(Color.CYAN);
insideHigh.SetLineWeight(3);
plot insideLow = if insideBar then low else if insideBar[1] then low[1] else Double.NaN;
insideLow.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
insideLow.SetDefaultColor(Color.MAGENTA);
insideLow.SetLineWeight(3);
Screenshot below shows the result.
Thanks a lot Pete. It works exactly as I wanted. Thanks a lot once again.