How to detect a trend is an easy question to ask and a deceptively difficult question to answer definitively in practice. To start the learning curve on the considerations that go into that question try googling "detecting a stock trend". Important note: be skeptical of everything you read. In general this question falls under the topic of technical analysis.
With that said, note that RE has many ready-made indicators that can help reach a conclusion whether a stock is trending or not. Look at a couple of them; perhaps use wikipedia to obtain a fuller explanation of each. Finally, the simplest of all trend indicators: is today's close higher than yesterday's? The catch is, as it is for all indicators, how reliably does that indicate what will happen tomorrow?
The search for reliable indicators is a research journey; RE is as good a laboratory as any for pursuing that interest.
See also Yahoo group about applying RE.