50% candlestick close
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Amit_001

//@version=5
indicator("50% candlestick close", overlay = true)
mid = (high-low)/2 + low
above50 = close >= mid
below50 = close < mid
barcolor(above50? color.new(color.green, 0) : na)
barcolor(below50? color.new(color.red, 0) : na)
