You may have the kernel of a viable strategy here, but your backtests aren't accurate because of the way Heikin Ashi candles are treated in Tradingview. They are synthetic candles and TV backtests will indicate trades based on the candles, not actual prices that you could have realized in live trading. An easy way to check for this is to check the trade history according to the backtest and then switch to normal candles and see the actual prices that were available at the time the trades were signaled.
This is not to say your work isn't valuable. Just be careful about treating the backtests as realistic historical performance. Hope this helps. Good luck!
Looks like a potentially profitable strategy. What time frame would you recommend?
I tried out the code on TSLA and ended up with a lot of green arrows, pic: https://gyazo.com/54315e75196d3714bc940490747df04c