How to filter the consolidation on 5 min chart

I`m building a trend follower EA bot, and i need to know,how to filter out the consolidation and ranging situations on a 5 min chart.What indicators are useful and preferably i wish to know the settings too.Thanks!