The economy's still shaky. Investors are scared. The markets aren't being friendly. How are you supposed to make money in an environment like this?

Stagnant markets are never easy to navigate, especially coming off a big rally like the one we saw during most of last year. Nevertheless, there are opportunities that smart investors can take advantage of. Even though they may not be glamorous, they're the most likely candidates to get your portfolio ready for your retirement, or any other long-term financial goal you have.

Ding the bling
You won't find the best stocks to save your retirement on the list of top-gaining stocks over the past few months. Sure, companies like PotashCorp and 3Par have seen strong advances after having been approached by potential acquirers. But the big money has already been made on those stocks, and combing through thousands of stocks to find a company that might be next in line for a major takeover is like searching for a needle in a haystack.

Nor should you automatically look for stocks that have dropped enough to land in what seems to be the bargain basement. Dell and Las Vegas Sands have each seen losses of 50% or more since the beginning of the recession, making them look more attractive to value hunters. But there are good reasons why these companies and many others like them could still be value traps, including loss of competitive advantages and corporate managers who haven't always made the smartest moves.

Both of these sets of stocks have gotten a lot of attention from investors looking for tomorrow's best stocks. But time and time again, history has shown that the best stocks for the future usually come straight of left field, where no one expects to see them.

Finding buried treasure
A lot of people -- myself included -- have been recommending big blue-chip dividend payers for those who are concerned about the market right now. There's a lot of merit to that, as some of the best known names in the market are also among those with the healthiest balance sheets and most stable prospects going forward. Consumer staples giant Procter & Gamble (NYSE: PG) isn't going to hit any home runs even by going abroad to cultivate new markets, but for solid growth and stable dividends going forward, you'll have to look hard to find a better choice.

To give you some more ideas to think about, I turned to the investors in our CAPS community for their insight. Specifically, I looked for small to midsized companies trading at reasonable multiples to earnings, and which haven't had big price swings over the past year. I also wanted to focus on stocks that paid dividends, that weren't too large, and that had favorable ratings from CAPS members, but weren't so widely followed that everyone already knew about them. Here are some of the stocks I came up with:

Stock

Trailing P/E

Dividend Yield

CAPS Rating / Number of Active Picks

Tyco Electronics (NYSE: TEL)

12.6

2.6%

**** / 175

Valspar (NYSE: VAL)

13.8

2.1%

**** / 89

AGL Resources (NYSE: AGL)

12.4

4.8%

***** / 182

Piedmont Gas (NYSE: PNY)

13.4

4.1%

***** / 169

Teleflex (NYSE: TFX)

11.0

2.8%

**** / 99

WGL Holdings (NYSE: WGL)

14.3

4.3%

***** / 69

Source: Motley Fool CAPS. As of Aug. 30.

From telecommunications electronics to paint, medical devices to energy, these six stocks represent a good cross-section of the overall economy. They're all reasonably priced without being blue-light specials, and none of them have sky-high dividend yields that so many people are flocking to. In fact, most of them have largely avoided the gaze of investors entirely.

If you look back, you'll notice that most of these companies have a good track record of performance. Tyco's shares have performed the worst, having been spun off from parent Tyco International near the market's highs in mid-2007, and suffering from being mired in the health-care sector. But the others have been around for a long time, and put in substantial gains year in and year out. 

AGL, Piedmont, and WGL have all benefited from the rise of energy-related stocks over the past 10 years. Teleflex brings a broad, almost Buffett-esque combination of businesses to investors, ranging from medical devices to aerospace cargo handling, recreational boat motors, and oil exploration products, and it's seen modest gains in revenue recently. Valspar makes paint and wood coatings, and it's found ways to reap stock gains even through the housing bust. Solid, unobtrusive companies like these won't show up on many investors' radar screens, but that only makes them more attractive for the Fools disciplined enough to dig for them.

Get on the road to retirement
Right now, it's just as important to preserve your capital as it is to make it grow. Fortunately, though, you don't have to choose between one or the other. With the right stocks, you can both protect your portfolio and set yourself up for good-sized gains during the next bull market.

This market is full of traps for the unwary. Let Bryan Hinmon steer you clear of this landmine stock.

Tune in every Monday and Wednesday for Dan's columns on retirement, investing, and personal finance.