To be able to correctly distinguish between trending and ranging market, might be one of the biggest challenges for forex traders of today. Almost anyone can find trend in the middle of the chart.
However, finding trend will become increasingly more difficult as we move east on the price chart. Realise that most of the traders struggle to distinguish the trend in real time. Therefore trade the formations (trend tunnels) that are the most clearly visible for best results.

Trend visualised using ZigZag forex indicator and fractals forex indicator
For the best results, trade with professional ECN/STP broker with MT4. If you can't trade with profit. Automatically copy the traders that are already profitable.
Uptrend in forex is established once the bulls begin to dominate. Bears are able to push the price down from time to time (corrections, swings down), only for more bulls to enter the uptrend at relatively better price.

Downtrend in forex represents strength advantage for bears, with correction upwards representing effort of bulls to reverse the trend.
This creates typical wave structure of the price, that can be found on any market and any trading instrument.

Balanced strength of bulls and bears creates ranging market - price being traded in the belt. Immediately after one group of traders pushes the price in they desired direction, other group considers it to be a good entry price for their opposing view of the market. This power draw will be resolved once one of the groups begins to dominate. Growing strength of one of the groups might be based on fundamental news, or it can just be some random capital entering the market with clear price direction view.
Distinguishing between range and the trend (How to identify trend in forex)
Confluence of signals is extremely important.
When you find an uptrend on 15 min chart, check also 1H and 4H chart. If you find matching trend in higher timeframes, there is growing possibility, that most of the traders involved in the market will notice the same trend as you and act upon it.
There is no point in struggling with trend in forex.
By finding clear picture of market conditions you will be able to trade with the price flow. Realise that market makers (smart money) never fight the crowd. They merely take advantage. They are also extremely proficient in reading the trend. Join the smart money in reading the trend and never trade on the wrong side of the market again.
At all the times, your goal should be to read the market as a market makers do (smart money). To be able to do so, you need to get familiar with:

Drawing trendlines and considering them in confluence with higher timeframes trenlines (supports and resistance zones).
Recognising support and resistance zones and being able to judge their strength.
By mastering those two tools in technical analysis, you should be able to distinguish between trending and ranging market with high level of competency. Your general view of the market should be similar to the one of the market makers (at least most of the time).
To add to your forex trading arsenal, learn to consider trend momentum (with MACD, ADX) and volumes. Also learn to use candle formations and chart patterns in forex. Those will serve you as flags. Some are green flags – signalizing trend health, while other signalize possibility of immediate reversal. Cummulation of red flags will filter out low quality trades.