This mod features some activation functions. Performance remains high. The repainting problem should be tested out.
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.
curr = scaleMinimax((useold ? security(syminfo.tickerid, tostring(tf), ***hlc3***, barmerge.gaps_off, barmerge.lookahead_on)
: security(syminfo.tickerid, tostring(tf), ***hlc3***)), tf, 0, 1)
Mind the commenting subsystem deletes square brackets, so literally the bit ***hlc3*** is hlc3 + square brackets + 1 + square brackets.