NEW YORK (CNNMoney.com) -- The Dow has hit three milestones in the past nine months: 12,000 last October, 13,000 in April and 14,000 on July 17.

If you've missed out on some of that lightning-speed run-up, you may feel one of two things:

Fear. You're sure if you buy stocks now, they'll tumble soon after, leaving you with a big bill and not much value. Greed. You're in the camp that thinks there's still upside in the near term, so you want to make sure you don't miss the next ride up.

Your best bet: "Ignore what the Dow is doing," said certified financial planner James Whiddon, author of Wealth Without Worry and co-host of "The Investing Revolution" on Dallas-based WBAP.com.

Older investors tend to steer clear of high-milestone markets, while younger ones tend to be more eager to jump when they see stocks moving higher, Whiddon said. But no one should be moving in and out of the market on short-term news or trends, and that includes recessions, which typically last eight- to 10 months.

With money you won't need for at least five years, "the best time to be in the market is always now," Whiddon said.

That's because trying to time the market may be more damaging to your portfolio long-term than taking an occasional bath on an investment.

If you're a bear and feel like you want to wait for cheaper stock prices, consider this: For every 20-year and 30-year rolling period since 1926, there have been more up months for stocks than down ones, according to Ibbotson Associates. And even over 10-year rolling periods, there were only two in which the months of negative stock returns exceeded those of positive ones.

Missing out on those high-return months (the timing of which you can't predict) can cost you a lot. A hundred dollars invested from 1926 to 2006 in the S&P 500 would have yielded $307,700, according to Ibbotson. But if you missed the 40 months with the highest returns you would have ended up with - no kidding - $1,823.

Granted, most people don't invest in the market for 80 years straight. But the principle holds over shorter time frames. Had you invested $100 in 1987 straight through 2006 you'd have ended up with $931. Had you been out of the market for the 17 best trading months, however, you'd have just $232.

But if you're a bull, keep in mind that the skeptics aren't crazy. If you hopped into stocks during the peak trading month right before the 1929 crash, you would have gotten a 9.4 percent annual average return through 2006, according to Ibbotson. Not bad, but not as good as the 10.5 percent return you would have gotten if you'd kept your money invested from 1926 through 2006.

You'll always be better off investing when stocks have fallen. Bill Miller, manager of the Legg Mason Value Trust, told Money Magazine's Jason Zweig, "rising stock prices mean lower future rates of return and falling stock prices mean higher rates of return. So I was much happier in the summer of '02 when you buy everything on sale than I was in the spring of 2000 when a lot of things were super-expensive." (Bill Miller speaks...from Money Magazine)

But, of course, you won't be able to predict when those sale days will occur.

So whether your impulse is to throw more money than usual into stocks now or, conversely, to steer clear, this may be one time when it pays to ignore your hunch.

The better step is to make sure you're positioned to benefit whether or not there is more upside to stocks in the near-term. That means keeping your portfolio well diversified, steadily investing the same amount of money every month so you're likely to lower your average costs over time, and rebalancing your portfolio once a year to keep your chosen asset allocation on course. (Get the rebalancing equation right.)

Unless, like Warren Buffett, you were "wired at birth to allocate capital," you might use low-cost index funds to ensure you do as well as the total market over time or, if you're investing for retirement, you might invest in a target-date retirement fund. That type of fund automatically allocates your assets based on how close you are to retiring - the closer you are, the more conservative the allocation becomes.