Editor's note: Jim Cramer's new book,

Real Money: Sane Investing in an Insane World

, is available in selected bookstores now. As a special bonus to


readers, we will be running Cramer's "Ten Commandments of Trading." For more about the new book and to order it, click here. To learn his "Twenty-Five Rules of Investing," click here. To read Cramer's first commandment, click here. To read Cramer's second commandment, click here. To read Cramer's third commandment, click here. Today, we present Cramer's fourth commandment.

When you mark something as a trade, you should not expect to make as much money on it as you would as an investment. A trade, like buying something into a quarter, is not about trying to make money over a long period of time.

Let's take

Apple Computer

(AAPL) - Get Report

. I think that Apple's a good trade into the quarter on Wednesday. I genuinely believe there is enough good news there that this $42 stock can ramp to $45.

But if there isn't?

I would be gone either way. I am not going to buy the stock for the quarter and then, if it doesn't work out, switch it into the investment file because I like the Tiger operating system's prospects for next quarter, or because the iPod Shuffle's a really cool gizmo.

And, most important, if it works and the stock goes up the next day, I am not going to say "You know what, this Apple's one good long-term story. I am going to stick it out."

I can't do that, because I had earmarked Apple for a trade before I started it. I can't tell you how many times I have bought something for a trade, had it go


and then held on to it only to lose the trading gain and come up with an investment loss. Hence my commandment:

Never turn a trading gain into an investment loss.

This year, in particular, I am talking to a lot of people who bought stocks for a trade and then ended up carrying them as a loss into the investment column. I recently spoke to one investor who had bought


(VLO) - Get Report

for a trade on gasoline prices, quickly picked up 7 points, and then rode it all the way back to where he bought it because he decided he "liked" Valero.

What does that mean?

You don't like Valero; you like the


Valero generated. Never confuse the two.

Or you most certainly will give back the profit.

James J. Cramer is a director and co-founder of TheStreet.com. He contributes daily market commentary for TheStreet.com's sites and serves as an adviser to the company's CEO. Outside contributing columnists for TheStreet.com and RealMoney.com, including Cramer, may, from time to time, write about stocks in which they have a position. In such cases, appropriate disclosure is made. To see his personal portfolio and find out what trades Cramer will make before he makes them, sign up for Action Alerts PLUS by

clicking here. While he cannot provide personalized investment advice or recommendations, he invites you to send comments on his column to

jjcletters@thestreet.com. Listen to Cramer's RealMoney Radio show on your computer; just click

here. Watch Cramer on "Mad Money" at 6 p.m. ET weeknights on CNBC. Click

here to order Cramer's latest book, "Real Money: Sane Investing in an Insane World," click

here to get his second book, "You Got Screwed!" and click

here to order Cramer's autobiography, "Confessions of a Street Addict."