I took your InsideBar and slapped in a few changes. It is ugly right now but I thought I'd share nonetheless.
Strength = number of minutes to recalculate period based off of
Spread = little different than before, its used as a divisor against period
I tested it on 5m, 15m and range charts, it seems to work well. Mess with strength values like 15, 30, 60 for instance and spread values of 2, 4, 8 for instance.
I'm heading to bed, hope it is of some use to you. Thanks for sharing it.