Change Pinescript indicator code (Tradingview) to show columns instead of candles

Job ID: 35951227

Budget: $10 – $30 USD

The attached indicator plots a chart that compares a given ticker to the ticker selected within the indicator, that chart can be shown in candles or line, I need to add a 3rd option: columns. Columns should be RED or GREEN, that is Up or Down, based on previous candle close and not on current candle open/close > this is important!!!
Related categories: Pine Script Trading