Heat profile
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © veryevilone

//@version=5
indicator("Heat profile", overlay = true)

topHeatHigh =  chart.point.now(high)
topHeatLow = if close > open
    chart.point.now(close)
else
    chart.point.now(open)

bottomHeatLow = chart.point.now(low)
bottomHeatHigh = if close < open
    chart.point.now(close)
else
    chart.point.now(open)

topHeatColor = input.color(color.rgb(128,128,128,98))
bottomHeatColor = input.color(color.rgb(128,128,128,98))

box.new(topHeatHigh, topHeatLow, topHeatColor, bgcolor=topHeatColor, extend=extend.right)
box.new(bottomHeatHigh, bottomHeatLow, bottomHeatColor, bgcolor=bottomHeatColor, extend=extend.right)