You can use ADX to determine trend or non-trend=range, say above 20 for trend or below 20 for no trend is an example.
Also there are many support and resistance indicators which are good to judge range market for the time frame being measured. A bounce off resistance, then a bounce off support would then be in a range. The other way is also true, like hitting support area then later bouncing off resistance. To simplify this even more, you can look at say a weekly chart. Place a line at the top of the previous weeks candle and a line at the bottom of the same candle. If price is within these lines then price is also in a range. The range of the previous weeks candle of course.