If you wish to deal with a ranging market then I will advise you to always look for the prevailing trend and then set tops and bottom with the use of horizontal lines. Trade in the direction of the trend from a point close to one horizontal line and close the trade close to the second horizontal line. Always be careful to watch out for a breakout.