One of the most important skills in trading is to trade with -- and not against -- the trend. So what is a trend? A trend can be defined as a stock market movement sustained over a specific time frame. The trend may be either up, down or sideways.

An uptrend is a series of higher highs while a downtrend is just the opposite: a series of lower lows.

That which defines the trend is the trendline. One of the most important skills in technical analysis is to be able to draw accurate trendlines. There are three simple steps to mastering this skill:

1. Start with a cycle low. This is a clear bottom on a chart.

2. Find a second point that will allow you to draw a straight line. This second point usually occurs after a pullback from an initial buying surge.

3. Find a third point on this same line. Two points on a line allow you to draw a somewhat tentative or hypothetical trendline; when three points have been touched, the trendline is confirmed.

Once you have found this third point, extend the line 'into space.'

As long as the stock's price stays above that trendline, by definition the stock is in an uptrend. You should hold the stock as long as the shares stay above the trendline or unless you see some early warning signal given by indicators or candlesticks that the trend may reverse.

The rules for drawing downtrend lines are exactly the reverse as those for drawing the uptrend line. But, instead of a cycle low, start with a cycle high.

A broken trendline means one of two things: either the stock will go into a period of sideways consolidation, or it will reverse course -- an uptrend will turn into a downtrend, and vice versa. In both cases, profit taking is appropriate.

The broken uptrend line is a potent signal when confirmed by indicators such as MACD, Stochastics and RSI.

Trendlines should not pass through the price bars of the stock. Sometimes it is absolutely necessary to violate this guideline to get a straight line, but in about 95% of cases you should follow this principle.

Trendlines of about 45 degrees in slope can hold for long periods when placed on arithmetic charts (equal space is given to each dollar increment change in price).

By contrast, trendlines with slopes much steeper than 45 degrees are apt to break quickly. It is important to be aware of this principle so that you do not prematurely exit from profitable positions or disastrous trades counter to the trend.

Sometimes you can find more than one valid trendline on a chart. For example, a stock can have a basic uptrend and then sharply accelerate upwards.

The more times a trendline has been touched, the more significant it is.

Trendlines are generally divided into three time frames:

Major: a longer-term trend that lasts from about six months to a year or more, also called a primary trend.

Intermediate: a trend that lasts from about one to six months. This trend can represent a correction in the major trend. It can also be referred to as a secondary trend.

Minor: a trend which lasts from a few days to about a month. It can refer to a correction or consolidation that represents a short pause in the larger trend. It is also called a short-term trend.

Generally, the longer the trend has occurred, the more significant it is. A major three-year trend is far more momentous than a three-month or three-week trend.

To best create trendlines, I recommend you toggle between daily and weekly time frames on a chart. A two or three-year weekly chart often shows a good picture of a major trend. Daily charts can be best for showing intermediate or minor trends.

I have used both time frames on the Valero (NYSE: VLO) chart below.

This three-year weekly chart shows VLO's sustained downtrend. A major downtrend line can be drawn from January 2008 until February of this year. note how VLO is just now rising above the downtrend line. This trendline break appears to signal a bullish reversal.

03-08-10-vlo-valero-1

The six-month daily chart (below) shows an intermediate uptrend which started in November 2009. Finally, I have drawn a minor uptrend line defining the rally of the past few weeks.

03-08-10-vlo-valero-2

Trend reversals are key for you to recognize as early as possible. They allow low-priced entry levels and also enable you to take profits near the top or bottom of an extended move.

Want to make a new acquaintance? If you follow these trendline principles, you will soon find the trend is your friend.

If you want to learn more about using technical analysis in your portfolio, check out: Double Top Formations Explained