You can use this script to backtest Heikin-Ashi bar color change strategy. You have to apply this script to usual candles and not Heikin-Ashi!!! Background color indicates HA bar color. On change you'll see green/red arrows and alert will be fired. Also you can find in the code calculations of all HA OHLC values.