>>In "live" trading I want to compute data on closed bars. How can I modify the formula I posted to used the last closed bar and not tick by tick?
Aha, just set your formula to check 1 bar ago. The formula builder will get you there.
You can use Bar[Close,5,1] as the closing price of the previous 5-minute bar, which is now fixed, where Bar[Close,5] is the closing price of the current bar, which will fluctuate with every tick.