Indicator on Tradingview repainting or not, how to discover it?

Good evening, I’m studying a strategy with a scale out strategy and this indicator.
I want to understand if the indicator is repainting or not, I will try copy the code or let you styddu it please. I have tried using visual refresh of the page but didn’t notice anything. When I do the testing with the bar replay the color are different. Can you please help me?
I’m working on a 1 hour timefraame. I have also read that maybe is ther a problem with the indicator with the securite code in?

Thankyou

//@version=2
study(“Heiken Ashi MTF”)
ha_t = heikinashi(tickerid)

res = input(‘60’, title=“TM 1”)
ha_open = security(ha_t, res, open)
ha_close = security(ha_t, res, close)
ha_dif = ha_open-ha_close
ha_diff=iff(ha_dif > 0, 1, iff(ha_dif<0, 2, 3))

res2 = input(‘240’, title=“TM 2”)
ha_open2 = security(ha_t, res2, open)
ha_close2 = security(ha_t, res2, close)
ha_dif2 = ha_open2-ha_close2
ha_diff2=iff(ha_dif2 > 0, 1, iff(ha_dif2<0, 2, 3))

res3 = input(‘D’, title=“TM 3”)
ha_open3 = security(ha_t, res3, open)
ha_close3 = security(ha_t, res3, close)
ha_dif3 = ha_open3-ha_close3
ha_diff3=iff(ha_dif3 > 0, 1, iff(ha_dif3<0, 2, 3))

plot(15, title=“TF1”, color=iff(ha_diff==1, red, iff(ha_diff==2, green, white)), style=circles, linewidth=5, join=true)
plot(14, title=“TF2”, color=iff(ha_diff2==1, red, iff(ha_diff2==2, green, white)), style=circles, linewidth=5, join=true)
plot(13, title=“TF3”, color=iff(ha_diff3==1, red, iff(ha_diff3==2, green, white)), style=circles, linewidth=5, join=true)