Hull MA(2 candles back) times 3 plus divided by price(1 candle back) = value1
Hull MA(3 candles back) times 3 plus divided by price(1 candle back) = value2
if value1>value2 then buy else sell
calculates price from 1 candle back, and calculates signal from 2nd and 3rd candle prices, so no repainting? so best on low timeframes.
for when use in bot, would not need 1 candle lag. Lag is for TV chartists to not have to suffer repainting.
Bots do not repaint. they are not "painting" anything, they simply open or close orders, which cannot be "repainted"
but here on TV chart, when you refresh the browser page, the script recalculates, and signals may be repainted.
hopefully this will not repaint. please test. thankyou
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.