In my 25-plus years as a trader and investor, the most important lesson I've learned -- and the most difficult to learn -- is to master myself and my behavior. Without question, that has made all the difference in the world. It has transformed me from a marginally successful market operator who was hot sometimes and cold most of the time, to someone who can now consistently and confidently move about in markets with the ability to produce a steady and rewarding stream of profits.

It is often said that successful trading requires a psychological makeup that seems contrary to human behavior. In addition, studies have also shown that 95% of all traders lose money. Both claims seem to support each other.

Learning the hard way
As an economist by education, I was always at a loss to explain what I saw happening around me in the early days of my trading career: People did dumb things. Yet I was no exception. I bought when the price was high, and I sold when the price was low. Sometimes, rather than take a small loss, I would hold on in the hope that things would turn around, only to be forced to take a much bigger loss later.

Then there were the times when I saw a great market opportunity well in advance. I bought at just the right moment only to exit shortly thereafter with a quick but measly profit. Then I got to sit back and watch the market skyrocket, while I felt total agony because I knew I'd just missed one of the biggest profit opportunities of my career.

I kept thinking that economics was not supposed to work like that. I was not supposed to work like that. What about all of the stuff I'd heard about people acting in their own self-interest and seeking their highest level of satisfaction? I started to reason that if this was my self-interest, than I had to be a masochist.

Years passed, and I devoted all of my energy to perfecting my analytical skills. Amazingly, as obvious as the behavioral element seems now, it was still not apparent to me then. I thought that if I could become the greatest market analyst, I would finally be able to arrive at the Promised Land. So I studied everything I could get my hands on --stock valuation, bond valuation, technical analysis, cycles, trading systems, Fibonacci numbers, pattern recognition, even astrology.

And you know what happened? I could dazzle people with my knowledge, but I still couldn't make a dime consistently in the markets.

The road to Damascus
Around this time, I started thinking that maybe the problem was me. I had a "we have met the enemy and it is us" kind of moment. From that point on, I started to focus on what I was doing to sabotage myself and then try to correct it.

Initially, the progress was slow. All of the old habits were taking their time going away. Little by little, however, change was occurring, and with that change came positive results. Soon, the momentum was building in the right direction, and my trading account was growing, too.

The four key elements
Over time, I began to see that the behavioral part is really simple. It can basically be distilled down to four elements: patience, detachment, alignment, and discipline. The first and the last you've probably heard before. The middle two are mine.

Let's start with patience -- the ability to wait and do nothing. Sounds easy, huh? It's not. Patience means you can sit around waiting for your perfect opportunity, whether it's a stock that's sufficiently undervalued, or a chart breakout that meets all of your technical criteria or the right set of economic fundamentals. Until you get exactly what you are looking for, you do nothing.

Patience also keeps you in a good position to get the maximum amount of profit. If your analysis tells you that the market should continue moving in the direction you believe it will, then have the patience to stick with it.

Next comes detachment. Where patience protected us from rash and emotional decisions (emotional trading is one of the main reasons that investors lose money), detachment protects us from harm, both financial and psychological. Detachment allows you to take that small loss, put it behind you, and not even give it a second thought. Detachment also allows you to realize that even if you missed an opportunity, another one will eventually come along. You won't be stressed. Finally, detachment lets you make all of the bad decisions you want (and yes, they will happen from time to time) without being affected emotionally. That's huge! You took a small profit in a bull market? With detachment, your attitude is, "So what? On to the next opportunity."

The third element is alignment -- using an investment approach or methodology that is aligned with your personality. For example, I am analytical by nature. I am also a natural-born contrarian. Therefore, I prefer operating in the manner of a value investor rather than as a momentum investor. I am not saying that momentum investing doesn't work. Some people are hugely successful at it. But it just clashes with my personality and makes me nervous.

Warren Buffett, the second-richest man in the world and CEO of Berkshire Hathaway (NYSE:BRKa) (NYSE:BRKb), used alignment in the boom days of the 1990s dot-com market. He said he didn't understand the dot-com market, so he sat out. People chastised him, but he had the last laugh.

To use alignment, determine what kind of person you are. Do you like action, or are you quiet and analytical, like me? Know who you are, and operate in that fashion. Operating outside your natural character will lead to too much conflict.

The fourth behavior is discipline, which you need if you want to maintain a strict adherence to the first three behaviors. This is the glue that holds it all together. If you don't have discipline, none of the other things will endure.

Fool contributor Michael Norman is the founder and publisher of the Economic Contrarian Update . He does not own shares of companies mentioned in this article. The Motley Fool has a disclosure policy.