Fixing LDT's Stacked Imbalance script

The indicator does not work in real time correctly. When the conditions are met and a bar shows, for example, a 3 stack imbalance of 300%, the indicator will highlight the imbalance correctly as expected.

However, if before the bar closes, those conditions change (ie, the imbalance is no longer there or is no longer at 300% or is no longer a stack of 3) the highlight will remain. This doesn’t happen every single time, but I’d say it happens about 80% of the time depending on different factors.

I believe it is because the indicator is not calculating at a per tick basis, and I need to have this fixed. I use a 1 minute time frame on a bid/ask (footprint) chart, and it is insanely obvious at that timeframe and disrupts my trading greatly. If anyone is willing to help make the indicator calculate on a per tick basis or fix whatever is wrong with the code, I would be eternaly greatful. If no one is willing to do it for free, I am willing to pay well and ahead of time for projects to be done depending on who it is helping (anyone who has published bid-ask volume/delta volume/footprint chart related indicators on the Tradovate platform)

I lost my contact info for tiki dave, and can’t get in touch with him. LDT isn’t responding by email, or its possible I saved the wrong address. I have a few more projects that I am willing to pay for related to this indicator. If anyone is interested helping with this issue, for free or for pay, please respond to this thread or message me to get my email address. Thank you.