Plot Closed Candles
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © tradefavorite2021

//@version=5
indicator("Plot Closed Candles", overlay=true )

// Must turn off normal candles first by right clicking on the candles and turning off borders , bodies , and wicks


plotcandle(barstate.isconfirmed and close>open ? open : na, high, low, close, color=color.green)

plotcandle(barstate.isconfirmed and close < open ? open : na, high, low, close, color=color.red)