not sure if it's what you're looking for but:
if you apply both Bollinger Bands and Keltner Channel to your chart, whenever both BBs are inside the KC then it indicates a period of consolidation/congestion. Then whenever one of the BBs moves outside KC it suggests that consol is over. This then allows you to set a bracket around the high and low of the consolidation period and trade the Breakout.
Not my idea - I learned originally from John Carter at Trade The Markets.
If you check out his website, he has an indicator where the BB and KC are converted into a row of dots, changing colour to signal "in" or "out" of consol ......
good luck, hope it helps...