ranging indicator

 
any indicator can detect ranging market ?
 
before or after the ranging period happens/ed?
 
before of course