Indicator that is most sensitive when price is ranging

I am practicing a scalping strategy. I think it is good but something odd about it is that I earn little pips and price oscillations in M5 timeframe is not favorable if I enter a trade and price begins to range. So I am asking for help. Can someone suggest an indicator that is best in telling me when price will probably range so I don’t enter at such situations because that is when I am losing money. I hope I am understood. Thanks

The best thing you could use is price action. If price stops making a higher high or lower low then it is in a range.

Thanks. Appreciate this insight.