Everyone knows you're not supposed to panic when the stock market crashes. But what you do when everything's going up is even more important than how you handle falling markets.

What, me worry?
After spending months worrying about everything from European sovereign debt to high unemployment, investors seem to have forgotten all about their troubles to bid up the price of just about everything. Take a look at some of the latest:

  • The Dow closed yesterday at its highest level since April, as U.S. stocks have continued to gain confidence from early third-quarter earnings releases. Alcoa (NYSE: AA) started things off with stronger growth forecasts, and Intel (Nasdaq: INTC) beat its lowered guidance handily. CSX (NYSE: CSX) continued the corporate cost-cutting trend by milking a 48% improvement in net income out of just a 16% revenue gain.
  • Foreign stocks also jumped as investors overseas look forward to taking advantage of U.S. quantitative easing. Emerging market ETFs hit 52-week highs, and even European stocks performed well.
  • Gold hit yet another new record and silver rose to its highest level in 30 years as the precious metals rally continued. Silver streamer Silver Wheaton (NYSE: SLW) clocked another all-time record high, and enthusiasm about copper prices have pushed miners Freeport-McMoRan (NYSE: FCX) and Southern Copper (NYSE: SCCO) to levels not seen since long before the commodities bust in 2008.
  • Even bonds managed to rally, as the iShares Barclays TIPS Bond ETF (NYSE: TIP) also approached its all-time high. Five-year TIPS now yield a ridiculous negative 0.58%. That's right; investors are accepting negative real yields in exchange for inflation protection.

In other words, no matter what you've been investing in, you've probably been a winner over the past month or so.

Raining on your parade
At first, the whole idea that rising markets are troublesome may sound ridiculous. After all, if your investments are rising in value, you should be happy. You're richer, and so you're clearly making the right moves with your money.

Two things, however, cause problems with that assessment. First of all, plenty of investors aren't making money, because they're stuck on the sidelines earning 0.01% or so in an "interest-bearing" checking account. Having fallen into the trap of wanting to wait for certainty before committing their money to new investments, they're now watching as all of their potential choices are soaring without them.

Second, even if you've stayed invested throughout the ups and downs of the financial markets during the past several years, you may well have additional money you'd like to invest. When prices of just about every type of investment go through the roof, it leaves value investors shaking their heads, wondering if gains are sustainable.

How to cope
How to handle a market meltup is similar in many ways to handling a meltdown. The first rule is exactly the same: Don't panic. You may feel a lot of pressure to go ahead and buy investments like gold or stocks that have been on the rise, fearing that they'll rise further and you'll miss out on potential profits. But succumbing to that pressure won't just push you into a decision you weren't ready to make; you'll also often turn out to buy at just the wrong time, when prices were at extreme high points.

Second, look for opportunities to cull out weak investments. When everyone's being greedy, you can sell stocks with serious problems at relatively high prices, letting risk-hungry investors speculate on continuing gains. You can then reinvest those sale proceeds into investments with more promise.

Last, make sure your investment portfolio still reflects the level of risk you're comfortable with. If one stock or asset class has risen so far that it dominates your portfolio, rebalancing is a good way to get your overall risk back in line.

All good things must come to an end
When investments of all sorts are going up, it's easy to get complacent. But smart investors understand that good times don't last forever. By taking advantage of boom times when they come, you can be much better prepared for the next market decline around the corner.

Even after a market meltup ends, great investments will continue to rise. Click here to get The Motley Fool's free report with 3 ETFs Set to Soar During the Recovery.

True to its name, The Motley Fool is made up of a motley assortment of writers and analysts, each with a unique perspective; sometimes we agree, sometimes we disagree, but we all believe in the power of learning from each other through our Foolish community.

Fool contributor Dan Caplinger will stop the world and melt with you. He doesn't own shares of the companies mentioned in this article. Motley Fool Options has recommended buying calls on Intel, which is a Motley Fool Inside Value pick. The Fool owns shares of Intel. Try any of our Foolish newsletters today, free for 30 days. The Fool's disclosure policy doesn't melt in your mouth or in your hand.