Heikin-Ashi Candle Coloring
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © @MrShadowTrader

//@version=5
indicator("Heikin-Ashi candle coloring", overlay=true)

[ha_open, ha_close] = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, [open, close])

barcolor(color = ha_close > ha_open? color.green : color.red, title = "Heikin-Ashi Candle Coloring")