How to Trade Both Trend and Range Markets by Single Strategy?

How to Trade Both Trend and Range Markets by Single Strategy?