Computers were a novelty at the time I wrote Trading for a Living. My first computer for technical analysis was an Apple 2E desktop with a boxy modem and two floppy drives. Each held a 300 KB diskette: one for the analytic program (Computrac, the first program for technical analysis) and the other for market data. When the first hard drives came out, I had a choice of buying a 2-, 5- or 10-MB (not giga-byte!) drive. Ten megabytes seemed too huge for anyone to ever need, so I sprang for a 5-MB hard drive. How technology has changed!

A trader without a computer is like a man traveling on a bicycle. His legs grow strong and he sees a lot of scenery, but his progress is slow. When you travel on business and want to get to the point fast, you get a car.

Today, very few people trade without computers. Our machines help track and analyze more markets in greater depth. They liberate us from the routine updating of charts, freeing up time for thinking. Computers allow us to use more complex indicators and spot more opportunities. Trading is an information game. A computer helps you process more information. On the minus side, with computers we lose a physical feel for price moves that comes from pencil and paper charting.

Computers in Trading

Computerized technical analysis is more objective than classical charting. You can argue whether support or resistance is present—but there can be no argument about an indicator’s direction. Of course, you still need to decide what to do after you identify an indicator’s message.


When working with wood or metal, you can go to a hardware store and buy a set of tools that can help you work smartly and efficiently. A technical analysis toolbox provides a set of electronic tools for processing market data.

When you decide to get into computerized technical analysis, begin by drawing a list of tasks you want your computer to perform. This will take some serious thinking, but it’s much better than getting a package first and scratching your head later, trying to figure out what it might do for you. Decide what markets you want to track, what types of charts to view and what indicators to use.

A toolbox draws weekly, daily, and intraday charts; it splits the screen into several windowpanes for plotting prices and indicators. A good toolbox includes many popular indicators, such as moving averages, channels, MACD, Stochastic, Relative Strength Index, along with dozens if not hundreds of others. It allows you to modify all indicators and even construct your own.

A good toolbox allows you to compare any two markets and analyze their spreads. If you trade options, your toolbox must include an options valuation model. Advanced packages allow you to backtest trading systems.

Another feature of a good toolbox is its ability to scan stocks. For example, you may want to find all stocks among the Nasdaq 100 whose exponential moving averages are rising, but whose prices are no more than 1% above their EMAs. Can your software scan for that? Can it add fundamental parameters to your search, such as rising earnings? Think what you want to find and then ask software vendors whether their products can do it for you.

There are good toolboxes at all price levels. A beginner making his first steps may sign up with an online service that offers a basic set of computerized tools for free; you can upgrade to a paid level later. Most charts in this book are drawn using just such a service, because I want you to see how much you can do while spending very little. Some traders find that sufficient, while many of us buy programs that reside on our computers, allowing greater customization. With prices of software in a steady decline, you don’t have to worry too much. Buy something simple and inexpensive and upgrade later—it’s a date, not a marriage.

Once you’ve decided what package to use, you may want to hire somebody who already uses it to help you set it up on your machine. This can save a great deal of time and energy for inexperienced users.

A growing number of brokerage firms offer free analytic software to their clients; the price is right, but they tend to have two serious limitations. First, for legal reasons, they make their software very hard to modify and second, it only works online. Traders often ask how to add my indicators to their brokerage software, and the usual answer is—you can’t.

Most brokerage house programs enable you to place and change your orders using the same analytic software. This can be quite handy and useful for day traders, but less important for longer-term traders. Be sure to disable a common feature that shows your equity gains or losses in real time. Watching dollars jump up or down at every tick is stressful and distracting. As the song goes, “...never count your money while you’re sitting at the table—there’ll be time enough for counting when the dealing’s done.” Focus on prices and indicators instead of watching dollars and thinking what you can buy with them.

Technical analysis software is constantly changing and evolving; a book is not the right place for software recommendations. My firm maintains a brief Software Guide, which we periodically update and e-mail to any trader who asks for it, as a public service.

As mentioned earlier in this book, most programs for technical analysis fall into one of three groups: toolboxes, black boxes, and gray boxes. Toolboxes are for serious traders, black boxes are for people who believe in Santa Claus, and gray boxes are in between. When considering a new software package, be sure to know which group it belongs to.

Black Boxes and Gray Boxes

Black box software is pure magic: it tells you what and when to buy and sell without telling you why. You download the data and push a button. Lights blink, gears click, and a message lights up, telling you what to do. Magic!

Black boxes always come with impressive track records that show profitable past performance. Every black box eventually self-destructs because markets keep changing. Even systems with built-in optimization don’t survive because we don’t know what kind of optimization will be needed in the future. There is no substitute for human judgment. The only way to make money from a black box is to sell one. Most black boxes are sold by hustlers to gullible or insecure traders.

Each black box is guaranteed to fail, even if sold by an honest developer. Complex human activities, such as trading, cannot be automated. Machines can help but not replace humans.

Trading with a black box means using a slice of someone else’s intelligence, as it existed at some point in the past. Markets change, and experts change their minds, but a black box keeps churning out its buy and sell signals. It would have been funny if it wasn’t so expensive for losers.

A gray box generates trading signals based on proprietary formulas. Unlike a black box, it discloses its general principles and allows you to adjust its parameters to some degree. The closer a gray box is to a toolbox, the better it is.


While online programs can run on any computer, most stand-alone programs are written for the Windows environment. Some traders run them on Macs, using emulation software. There are even programs for tablets, such as iPads.

Technical analysis software tends to be not very demanding of processing power, but still, it makes sense to get the most modern machine so that it remains useful for years.

Many day traders like to use multiple screens for a multidimensional view of the markets and the ability to watch several trading vehicles at once. Since I like to travel, I carry a small external screen that helps me monitor markets and trade from the road. It’s the size of my laptop but much thinner and attaches to it with a USB cable, without a power cord.

Market Data

Swing and position traders enter and exit trades within days or weeks, while day traders enter and exit within a few hours if not minutes. End-of-day data is sufficient for position traders, but day traders need real-time data.

When you download the daily data for research, it pays to cover two bull-and-bear-market cycles, or about 10 years. Whenever I approach a stock, I like to look back at 12 years of trading history to see whether it is cheap or expensive relative to its 12-year range.

Whenever you approach a trade, you must know your edge—what will help you make money. The ability to recognize patterns is a part of my edge, but if a stock’s history is too short, there are no reliable patterns to identify. That’s why I avoid trading very young stocks, those with less than a year’s history.

When collecting and analyzing data, don’t chase too many markets at once. Focus on quality and depth rather than quantity. Begin by following the key market indexes, such as the Dow, the NASDAQ, and the S&P. Many professional traders focus on a relatively small number of stocks. They get to know them well and become familiar with their behavior patterns.

You could start out by focusing on a dozen stocks. Many professionals limit themselves to fewer than 100 stocks, which they review every weekend and mark their opinions in a fresh column of their spreadsheet. They may select fewer than 10 stocks from that pool that look promising for the week ahead and focus on them. Build your watch list gradually from the popular stocks of the year; add a few stocks from the most promising industries and some stocks you’ve traded before. Building a watch list is like gardening: you can’t get a beautiful garden in a single season, but you can get there over several seasons.

Try to stick to the data in your own time zone. When I teach overseas, traders often ask whether I trade in their country. I remind them that whenever you put on a trade, you’re trying to take money out of some other trader’s pocket, while others are trying to pick yours. This game is hard enough when you’re awake, but it is risky to trade in a different time zone, allowing locals to pick your pockets while you sleep. This is why I largely limit my trading to the U.S. markets. 

Many overseas traders complain that they find their domestic markets too thin and ask whether it would make sense for them to trade in the huge and liquid U.S. market. The answer depends on how different their time zone is from the U.S. market’s time zone. For example, the U.S. markets are easy to trade from Europe where they open at 3:30 p.m. local time and close at 10 p.m. It is much harder to do from Asia or Australia, but it can work if you take a longer view and aim to catch longer-term trends.

Beginning traders should steer clear of day-trading. It demands instant decision making, and if you stop to think, you’re dead. Learn to trade in a slower environment. Become a competent position or swing trader before you consider day-trading. If you compare swing trading and day-trading, it is like playing the same video game at level one or level nine. You run the same mazes and dodge the same monsters, but the pace of the game is so fast at level nine that your reactions must be automatic. Learn to analyze markets at level one—become a swing trader before attempting to day-trade.

A good place to get started is swing trading, i.e., holding positions for several days. Select popular stocks that have good swings on a good volume. Start out by following just a handful. Some swing traders who hold positions for only a few days use real-time data for timing entries and exits, while others manage quite well with end-of-day data.

Three Major Groups of Indicators

Indicators help identify trends and reversals. They are more objective than chart patterns and provide insight into the balance of power between bulls and bears.

A great challenge is that various indicators may contradict one another. Some of them work best in trending markets, others in flat markets. Some are good at catching turning points, while others are better at riding trends. That’s why it pays to select a small number of indicators from various groups and learn to combine them.

Many beginners look for a “silver bullet”—a single magic indicator, but markets are too complex to be handled with a single tool. Others try to poll a multitude of indicators and average their signals. The results of such a “poll” will be heavily skewed by the indicators you select.

Most indicators are based on the same five pieces of data: open, high, low, close, and volume. Prices are primary; indicators are derived from them. Using ten, twenty, or fifty indicators will not deepen your analysis because they share the same base.

We can divide indicators into three groups: trend-following indicators, oscillators, and miscellaneous. Trend-following indicators work best when markets are moving, but the quality of their signals sharply deteriorates when the markets go flat. Oscillators catch turning points in flat markets but give premature and dangerous signals when the markets begin to trend. Miscellaneous indicators provide insights into mass psychology. Before using any indicator, be sure to understand what it measures and how it works. Only then can you have confidence in its signals.

Trend-following indicators include moving averages, MACD Lines (moving average convergence-divergence), the Directional System, On-Balance Volume, Accumulation/Distribution, and others. Trend-following indicators are coincident
or lagging indicators—they turn after trends reverse.

Oscillators help identify turning points. They include MACD-Histogram, Force Index, Stochastic, Rate of Change, Momentum, the Relative Strength Index, Elder-ray, Williams %R, and others. Oscillators are leading or coincident indicators that often turn ahead of prices.

Miscellaneous indicators provide insights into the intensity of bullish or bearish camps. They include the New High–New Low Index, the Put-Call Ratio, Bullish Consensus, Commitments of Traders, and others. They can be leading or coincident indicators.

It pays to combine several indicators from different groups so that their negative features cancel each other out, while their positive features remain undisturbed. This is the aim of the Triple Screen trading system.

As we begin to explore indicators, a few words of caution. Sometimes their signals are very clear, while at other times they are quite vague. I’ve learned long ago to enter trades only when indicator signals “grab me by the face.” If I find myself squinting at a chart while trying to understand its signals, I flip the page and move to the next stock.

If you look at a familiar indicator but can’t understand its message, it is most likely because the stock you’re trying to analyze is in a chaotic stage. If indicator signals aren’t clear, don’t start massaging them or piling on more indicators, but simply leave that stock alone for the time being and look for another one. One of the great luxuries of private traders is that no one pushes us to trade—we can wait for the best and clearest signals.

As you read about the signals of different indicators, remember that you cannot base trading decisions on a single indicator. We need to select several indicators we understand and trust and combine them into a trading system.

Moving Averages

Wall Street old-timers say that moving averages were brought to the financial markets after World War II. Antiaircraft gunners used moving averages to site guns on enemy planes and after the war, applied this method to moving prices. The two early experts on moving averages were Richard Donchian and J. M. Hurst—neither apparently a gunner. Donchian was a Merrill Lynch employee who developed trading methods based on moving average crossovers. Hurst was an engineer who applied moving averages to stocks in his classic book, The Profit Magic of Stock Transaction Timing.

A moving average (MA) reflects the average value of data in its time window. A 5-day MA shows the average price for the past 5 days, a 20-day MA for the past 20 days, and so on. Connecting each day’s MA value gives you a moving average line.

      where  P is the price being averaged
                   N is the number of days in the moving average

The level of a moving average reflects values that are being averaged and depends on the width of the MA window. Suppose you want to calculate a 3-day simple moving average of a stock. If it closes at 19, 21, and 20 on three consecutive days, then a 3-day simple MA of closing prices is 20 (19 + 21+ 20, divided by 3). Suppose that on the fourth day the stock closes at 22. It makes its 3-day MA rise to 21—the average of the last three days (21 + 20 + 22), divided by 3.

There are three main types of moving averages: simple, exponential, and weighted. Simple MAs used to be popular because they were easy to calculate in precomputer days, and both Donchian and Hurst used them. Simple MAs, however, have a fatal flaw—they change twice in response to each price.

Twice as Much Bark

First, a simple MA changes when a new piece of data comes in. That’s good—we want our MA to reflect the latest prices. The bad thing is that MA changes again when an old price is dropped off at the end of its window. When a high price is dropped, a simple MA ticks down. When a low price is dropped, a simple MA rises. Those changes have nothing to do with the current reality of the market.

Imagine that a stock hovers between 80 and 90, and its 10-day simple MA stands at 85 but includes one day when the stock reached 105. When that high number is dropped at the end of the 10-day window, the MA will dive, as if in a downtrend. That meaningless dive has nothing to do with the current trend.

When an old piece of data gets dropped off, a simple moving average jumps. This problem is worse with short MAs but not so bad with long MAs. If you use a 10-day MA, those drop-offs can really shake it because each day constitutes 10% of the total value. On the other hand, if you use a 200-day MA, where each day is responsible for only 0.5%, dropping off a day isn’t going to influence it a lot.

Still, a simple MA is like a guard dog that barks twice—once when someone approaches the house, and once again when someone walks away from it. After a while, you don’t know when to believe that dog. This is why a modern computerized trader is better off using exponential moving averages.

Market Psychology

Each price is a snapshot of the current consensus of value among all market participants. Still, a single price doesn’t tell you whether the crowd is becoming more bullish or bearish, just as you can’t tell from a single photo whether a person is an optimist or a pessimist. If, on the other hand, you take a daily photo of a person for ten days, bring them to a lab, and order a composite picture, it’ll reveal that person’s typical features. You can monitor trends in that person’s mood by updating that composite photo each day.

A moving average is a composite photograph of the market—it combines prices for several days. The market consists of huge crowds, and the MA slope identifies the direction of mass inertia. A moving average represents an average consensus of value for the period of time in its window.

The most important message of a moving average is the direction of its slope. When it rises, it shows that the crowd is becoming more optimistic—bullish. When it falls, it shows that the crowd is becoming more pessimistic—bearish. When prices rise above a moving average, the crowd is more bullish than before. When prices fall below a moving average, the crowd is more bearish than before.

Exponential Moving Averages

An exponential moving average (EMA) is a better trend-following tool because it gives greater weight to the latest data and responds to changes faster than a simple MA. At the same time, an EMA doesn’t jump in response to dropping old data. This guard dog has better ears, and it barks only when someone approaches the house.

                                               EMA = Ptod • K + EMAyest • (1 − K)

           where   K = 2/N+1
                         N = the number of days in the EMA (chosen by the trader).
                    Ptod = today’s price.
            EMAyest = the EMA of yesterday.

Technical analysis software allows you to select EMA length. An EMA has two major advantages over a simple MA. First, it assigns greater weight to the last trading day. The latest mood of the crowd is more important. In a 10-day EMA, the last closing price is responsible for 18 percent of EMA value, while in a simple MA all days are equal. Second, EMA does not drop old data the way a simple MA does. Old data slowly fades away, like a mood of the past lingering in a composite photo.

Choosing the Length of a Moving Average

It pays to monitor your EMA slope because a rising line reflects bullishness and a declining one bearishness. A relatively narrow window makes an EMA more sensitive to price changes. It catches new trends sooner, but leads to more whipsaws. A whipsaw is a rapid reversal of a trading signal. An EMA with a wider time window produces fewer whipsaws but misses turning points by a wider margin.

You can take several approaches to deciding how long to make your moving average or any other indicator. It would be nice to tie EMA length to a price cycle if you can find it. A moving average should be half the length of the dominant market cycle. If you find a 22-day cycle, use an 11-day moving average. If the cycle is 34 days long, then use a 17-day moving average. Trouble is, cycles keep changing and disappearing.

There is no single magic “best” number for the EMA window. Good indicators are robust—not too sensitive to small changes in their parameters. When trying to catch longer trends, use a longer moving average. You need a bigger fishing rod to catch a bigger fish. A 200-day moving average works for long-term stock investors who want to ride major trends.

Most traders can use an EMA between 10 and 30 days. A moving average should not be shorter than 8 days to avoid defeating its purpose as a trend-following tool. Among the numbers I like are 22 because there are approximately 22 trading days in a month and 26—half of the number of trading weeks in a year.

Creating individualized parameters for every trading vehicle is practical only if you track a tiny handful of stocks or futures. Once their number reaches double digits, individualized parameters create confusion. It is better to have a yardstick that’s one yard long and use the same parameters for all your moving averages in the same timeframe.

Don’t change indicator parameters while looking for trades. Fiddling with parameters to obtain signals you’d like to see robs your indicators of their most valuable feature—their objectivity. It is better to set your parameters and live with them.

Trading Rules

Beginning traders try to forecast the future. Professionals don’t forecast; they measure the relative power of bulls and bears, monitor the trend, and manage their positions.

Moving averages help us trade in the direction of the trend. The single most important message of a moving average comes from the direction of its slope. It reflects the market’s inertia. When an EMA rises, it is best to trade the market from the long side, and when it falls, it pays to trade from the short side.

  1. When an EMA rises, trade that market from the long side. Buy when prices dip near the moving average. Once you are long, place a protective stop below the latest minor low, and move it to the break-even point as soon as prices close higher.
  2. When the EMA falls, trade that market from the short side. Sell short when prices rally toward the EMA and place a protective stop above the latest minor high. Lower your stop to breakeven as prices drop.
  3. When the EMA goes flat and only wiggles a little, it identifies an aimless, trendless market. Do not trade using a trend-following method.

FIGURE  DIS daily 22-day EMA.

Old traders used to follow fast and slow MA crossovers. The favorite approach of Donchian, one of the originators of trading with moving averages, was to use crossovers of 4-, 9-, and 18-day MAs. Trading signals were given when all three MAs turned in the same direction. His method, like other mechanical trading methods, only worked during strongly trending markets.

Trying to filter out whipsaws with mechanical rules is self-defeating—filters reduce profits as much as losses. An example of a filter is a rule that requires prices to close on the other side of MA not once, but twice, or to penetrate MA by a certain margin. Mechanical filters reduce losses, but they also diminish the best feature of a moving average—its ability to lock onto a trend at an early stage.

A trader must accept that an EMA, like any other trading tool, has good and bad sides. Moving averages help you identify and follow trends, but they lead to whipsaws in trading ranges.

More on Moving Averages

Moving averages often serve as support and resistance. A rising MA tends to serve as a floor below prices, and a falling MA serves as a ceiling above them. That’s why it pays to buy near a rising MA, and sell short near a falling MA.

Moving averages can be applied to indicators as well as prices. For example, some traders use a 5-day moving average of volume. When volume falls below its 5-day MA, it shows reduced public interest in the minor trend and indicates that it is likely to reverse. When volume overshoots its MA, it shows strong public interest and confirms the price trend. We’ll be using moving averages of an indicator when we work with Force Index.

The proper way to plot a simple moving average is to lag it behind prices by half its length. For example, a 10-day simple MA properly belongs in the middle of a 10-day period and it should be plotted underneath the 5th or 6th day. An exponential moving average is more heavily weighted toward the latest data, and a 10-day EMA should be lagged by two or three days. Most software packages allow you to lag a moving average.

Moving averages can be based not only on closing prices but also on the mean between the high and the low, which can be useful for day traders.

An exponential moving average assigns greater weight to the latest day of trading, but a weighted moving average (WMA) allows you to assign any weight to any day, depending on what you deem important. WMAs are so complicated that traders are better off using EMAs.

Dual EMAs

Whenever I analyze charts, I like to use not one but two exponential moving averages. The longer EMA shows a longer-term consensus of value. The shorter-term EMA shows a shorter-term consensus of value.

I keep the ratio between them at approximately two to one. For example, I may use a 26-week and a 13-week EMA on a weekly chart, or a 22-day and an 11-day EMA on a daily chart. Please understand there is no magic set of numbers. You should feel free to play with these values, selecting a set that will be unique to you. Just keep in mind to keep the difference between the two EMAs near 2:1. It might be simpler and more efficient to use the same set of values (for example 26/13 or 22/11) in all timeframes: weekly, daily, and even intraday.

Since the shorter EMA represents the short-term consensus of value and the longer-term EMA the long-term consensus, I believe that value “lives” between these two lines. I call the space between the two EMAs the value zone.

Moving Averages and Channels

A channel consists of two lines drawn parallel to a moving average. Oddly enough, the distance between the upper and the lower channel lines is sometimes described as “height” and at other times as “width” of the channel, even though both refer to the same measurement.

A well-drawn channel should contain approximately 95% of all prices that occurred during the past 100 bars. Longer-term markets have wider channels because prices can cover greater distances in 100 weeks than in 100 days. Volatile markets have wider (or taller) channels than quiet, sleepy markets.

Prices, Values, and the Value Zone

One of the key concepts in market analysis—the concept that all of us intuitively understand but almost never spell out—is that prices are different from values. We buy stocks when we feel that their current prices are below their true value and expect prices to rise. We sell and sell short when we think that stocks are priced above their real value and are likely to come down.

We buy undervalued stocks and sell overvalued shares—but how to define value? Fundamental analysts do it by studying balance sheets and annual reports, but those sources aren’t nearly as objective as they seem. Companies often massage their financial data. Fundamental analysts don’t have a monopoly on the concept of value. Technical analysts can define values by tracking the spread between a fast and a slow EMA. One of these EMAs reflects a short-term and the other a long-term consensus of value. Value lives in the zone between the two moving averages.

Very important: it’s impossible to trade successfully with just a single indicator or even a pair of moving averages. Markets are too complex to extract money from them with a single tool. We need to build a trading system using several indicators as well as analyze markets in more than one timeframe. Keep this in mind as we review various indicators—they are the building blocks of trading systems.

FIGURE  DIS daily, 26- and 13-day EMAs.

Keeping this in mind will help you become a more rational trader. Once you know how to define value, you can aim to buy at or below value and sell above value. We’ll return to look for trading opportunities in overvalued and undervalued markets when we examine price channels or envelopes.

Moving Average Convergence-Divergence: MACD Lines and MACD-Histogram

Moving averages help identify trends and their reversals. A more advanced indicator was constructed by Gerald Appel, an analyst and money manager in New York. Moving Average Convergence-Divergence, or MACD for short, consists of not one, but three exponential moving averages. It appears on the charts as two lines whose crossovers give trading signals.

How to Create MACD

The original MACD indicator consists of two lines: a solid line and a dashed line. The MACD line is made up of two exponential moving averages (EMAs). It responds to changes in prices relatively quickly. The Signal line smooths the MACD line with another EMA. It responds to changes in prices more slowly. In Appel’s original system, buy and sell signals were given when the fast MACD line crossed above or below the slow Signal line.

The MACD indicator is included in most programs for technical analysis. To create MACD by hand:
  1. Calculate a 12-day EMA of closing prices.
  2. Calculate a 26-day EMA of closing prices.
  3. Subtract the 26-day EMA from the 12-day EMA, and plot their difference as a solid line. This is the fast MACD line.
  4. Calculate a 9-day EMA of the fast line, and plot the result as a dashed line. This is the slow Signal line.

Market Psychology

Each price reflects the consensus of value among the mass of market participants at the moment of the trade. A moving average represents an average consensus of value for a selected period of time—it is a composite photo of mass consensus. A longer moving average tracks longer-term consensus, and a shorter moving average tracks shorter-term consensus.

Crossovers of the MACD and Signal lines identify shifts in the balance of power of bulls and bears. The fast MACD line reflects mass consensus over a shorter time period. The slow Signal line reflects mass consensus over a longer period. When the fast MACD line rises above the slow Signal line, it shows that bulls dominate the market, and it is better to trade from the long side. When the fast line falls below the slow line, it shows that bears dominate the market and it pays to trade from the short side.

Trading Rules for MACD Lines

Crossovers of the MACD and Signal lines identify changes of market tides. Trading in the direction of a crossover means going with the flow of the market. This system generates fewer trades and whipsaws than mechanical systems based on a single moving average.

  1. When the fast MACD line crosses above the slow Signal line, it gives a buy signal. Go long, and place a protective stop below the latest minor low.
  2. When the fast line crosses below the slow line, it gives a sell signal. Go short, and place a protective stop above the latest minor high.

Bottoms A, B, and C of ABX could be seen as an inverted head-and-shoulders bottom. Still, our technical indicators deliver much more objective messages than classical chart patterns.

More on MACD Lines

Sophisticated traders tend to personalize their MACD Lines by using other moving averages than the standard 12-, 26-, and 9-bar EMAs. Beware of optimizing MACD too often. If you fiddle with MACD long enough, you can make it give you any signal you'd like.

FIGURE  ABX weekly, 26- and 13-week EMAs, 12-26-9 MACD Lines.

A “quick-and-dirty” way to plot MACD can be used by traders whose software doesn’t include this indicator. Some packages allow you to draw only two EMAs. In that case, you can use crossovers between two EMAs, such as 12-day and 26-day EMAs as a proxy for MACD and Signal lines.


MACD-Histogram offers a deeper insight into the balance of power between bulls and bears than the original MACD Lines. It shows not only whether bulls or bears are in control but also whether they are growing stronger or weaker. It is one of the best tools available to market technicians.

                                  MACD-Histogram = MACD line − Signal line

MACD-Histogram measures the difference between the MACD line and the Signal line. It plots that difference as a histogram—a series of vertical bars. That distance may appear puny, but a computer rescales it to fill the screen.

FIGURE DJIA daily, 26- and 13-day EMAs, 12-26-9 MACD Lines.

If the fast line is above the slow line, MACD-Histogram is positive and plotted above the zero line. If the fast line is below the slow line, MACD-Histogram is negative and plotted below the zero line. When the two lines touch, MACD-Histogram equals zero.

When the spread between the MACD and Signal lines increases, MACD-Histogram becomes taller or deeper, depending on its direction. When the two lines draw closer, MACD-Histogram becomes shorter.

The slope of MACD-Histogram is defined by the relationship between any two neighboring bars. If the last bar is higher (like the height of letters m–M), the slope of MACD-Histogram is up. If the last bar is lower (like the depth of letters P–p), then the slope of MACD-Histogram is down.

Market Psychology

MACD-Histogram reveals the difference between long-term and short-term consensus of value. The fast MACD line reflects market consensus over a shorter period. The slow Signal line reflects market consensus over a longer period. MACD-Histogram tracks the difference between them.

The slope of MACD-Histogram identifies the dominant market group. A rising MACD-Histogram shows that bulls are becoming stronger. A falling MACD-Histogram shows that bears are becoming stronger.

When the fast MACD line rallies ahead of the slow Signal line, MACD-Histogram rises. It shows that bulls are becoming stronger than they have been—it is a good time to trade from the long side. When the fast MACD line drops faster than the slow line, MACD-Histogram falls. It shows that bears are becoming stronger—it’s a good time to trade from the short side.

When the slope of MACD-Histogram moves in the same direction as prices, the trend is safe. When the slope of MACD-Histogram moves in a direction opposite to that of prices, the health of the trend is in question.

The slope of MACD-Histogram is more important than its position above or below the centerline. It is best to trade in the direction of the slope of MACD-Histogram because it shows whether bulls or bears dominate the market. The best buy signals occur when MACD-Histogram is below its centerline but its slope turns up, showing that bears have become exhausted. The best sell signals are given when MACD-Histogram is above its centerline but its slope turns down, showing that bulls have become exhausted.

Trading Rules

MACD-Histogram gives two types of trading signals. One is common, occurring at every price bar. The other is rare but extremely strong. It may occur only a few times a year on the daily chart of a stock. It’s even more rare on the weekly charts, but more frequent on the intraday charts.

The common signal is given by the slope of MACD-Histogram. When the current bar is higher than the preceding bar, the slope is up. It shows that bulls are in control and it’s time to buy. When the current bar is lower than the preceding bar, the slope is down. It shows that bears are in control and it’s time to be short. When prices go one way but MACD-Histogram moves the other way, it shows that the dominant crowd is losing its enthusiasm and the trend is weaker than it appears.

  1. Buy when MACD-Histogram stops falling and ticks up. Place a protective stop below the latest minor low.
  2. Sell short when MACD-Histogram stops rising and ticks down. Place a protective stop above the latest minor high.

MACD-Histogram ticks up and down on the daily charts so often that it’s not practical to buy and sell every time it turns. The changes of slope of MACD-Histograms are much more meaningful on the weekly charts, which is why it is included in the Triple Screen trading system. A combination of an exponential moving average and MACD-Histogram helps create the Impulse system.

When to Expect a New Peak or Valley

A record peak for the past three months of daily MACD-Histogram shows that bulls are very strong and prices are likely to rise even higher. A record new low for MACD-Histogram for the past three months shows that bears are very strong and lower prices are likely ahead.

When MACD-Histogram reaches a new high during a rally, the uptrend is healthy and you can expect the next rally to retest or exceed its previous peak. If MACD-Histogram falls to a new low during a downtrend, it shows that bears are strong and prices are likely to retest or exceed their latest low.

MACD-Histogram works like headlights on a car—it gives you a glimpse of the road ahead. Not all the way home, mind you, but enough to drive safely at a reasonable speed.

More on MACD-Histogram

MACD-Histogram works in all timeframes: weekly, daily, and intraday. Signals in longer timeframes lead to greater price moves. For example, the signals of weekly MACD-Histogram lead to greater price changes than the daily or intraday MACD. This principle applies to all technical indicators.

When you use MACD Lines and MACD-Histogram on the weekly charts, you don’t have to wait until Friday to find your signals. A trend can turn in the middle of the week—the market does not watch the calendar. It makes sense to perform weekly studies each day. I set my software to plot weekly charts in the traditional manner, from Monday through Friday, but with a twist: the latest weekly bar reflects trading for the current week, starting on Monday. After the market closes on Monday, my latest ‘weekly bar’ is identical to Monday’s daily bar. The weekly bar on Tuesday reflects two trading days, and so on. Because of this, on Monday I take the new weekly bar at a heavy discount, but by Thursday I start trusting it a great deal more.


Divergences are among the most powerful signals in technical analysis. We’ll focus on MACD-Histogram, but this concept applies to most indicators.

Divergences between MACD-Histogram and prices are infrequent, but they give some of the most powerful signals. They often mark major turning points. They don’t occur at every important top or bottom, but when you see one, you know that a big reversal is probably at hand.

Bullish divergences occur towards the ends of downtrends—they identify market bottoms. A classical bullish divergence occurs when prices and the oscillator both fall to a new low, rally, with the oscillator rising above its zero line, then both fall again. This time, prices drop to a lower low, but an oscillator traces a higher bottom than during its previous decline. Such bullish divergences often precede sharp rallies.

FIGURE  DJIA weekly, 26- and 13-day EMAs, 12-26-9 MACD Lines and MACD-Histogram. 

I’m showing you this weekly chart of DJIA and its MACD-Histogram as a perfect example of a divergence. It deserves to be pinned to a wall near your trading desk. You won’t always get such a perfect picture, but the closer you get to it, the more reliable it’ll be.

Notice that the breaking of the centerline between two indicator bottoms is an absolute must for a true divergence. MACD-Histogram has to cross above that line before skidding to its second bottom. If there is no crossover, there is no divergence.

Another key point: MACD-H gives a buy signal when it ticks up from the second bottom. It does not have to cross above the centerline for the second time. The buy signal occurs when MACD-H, still below zero, simply stops declining and traces out a bar that is less negative than its preceding bar.

This divergence of MACD-Histogram was reinforced when MACD Lines traced a bullish pattern between the bottoms A and C, with the second bottom more shallow than the first. Such patterns of MACD Lines are quite rare. They indicate that the coming uptrend is likely to be especially strong, even though we cannot call them divergences because this indicator has no zero line. The rally that began in 2009 lasted almost a year before its first meaningful correction.

Also, we can’t call the pattern of lower indicator tops after the bottom C a divergence. The lower tops reflect a gradual weakening of the uptrend with the passage of time. In order to count as a divergence, MACD-Histogram has to cross and recross its zero line.

Bearish divergences occur in uptrends—they identify market tops. A classical bearish divergence occurs when prices reach a new high and then pull back, with an oscillator dropping below its zero line. Prices stabilize and rally to a higher high, but an oscillator reaches a lower peak than it did on a previous rally. Such bearish divergences usually lead to sharp breaks.

A bearish divergence shows that bulls are running out of steam, prices are rising out of inertia, and bears are ready to take control. Valid divergences are clearly visible—they seem to jump at you from the charts. If you need a ruler to tell whether there is a divergence, assume there is none.

The previous chart featured a striking bullish divergence at the 2009 stock market bottom. Now, for a similarly striking illustration of a massive bearish divergence, let’s roll back the clock and examine the 2007 bull market top.

Notice that the breaking of the centerline between the two indicator tops is an absolute must for a true divergence. MACD-Histogram has to drop below its zero line before rising to the second top.

Another key point: MACD-H gives a sell signal when it ticks down from the second top. We don’t need to wait for it to cross below the centerline again. The sell signal occurs when MACD-H, still above zero, simply stops rising and traces out a bar shorter than the preceding bar.

The message of a bearish divergence was reinforced by MACD Lines, which traced a bearish pattern between the tops X and Z. The second top of MACD Lines was more shallow than the first, confirming the bearish divergence of MACD-H. Such patterns of MACD Lines tell us that the coming downtrend is likely to be especially severe.

FIGURE  DJIA weekly, 26- and 13-day EMAs, 12-26-9 MACD Lines and MACD-Histogram. 

“Missing right shoulder” divergences in which the second peak fails to cross the zero line are quite rare, but produce very strong trading signals. An experienced trader can look for them, but they are definitely not for beginners. They are described and illustrated in the e-book Two Roads Diverged: Trading Divergences.

Kerry Lovvorn performed extensive research to find that the most tradable divergences occur when the distance between the two peaks or the two bottoms of MACD-H is between 20 and 40 bars—and the closer to 20, the better. In other words, the two tops or two bottoms cannot be too far apart. 20 bars translate into 20 weeks on a weekly chart, 20 days on a daily chart, and so on. Kerry also found that the best signals come from divergences in which the second top or bottom is no more than half the height or the depth of the first.

Triple Bullish or Bearish Divergences consist of three price bottoms and three oscillator bottoms or three price tops and three oscillator tops. They are even stronger than regular divergences. In order for a triple divergence to occur, a regular bullish or bearish divergence first has to abort. That’s another good reason to practice tight money management! If you lose only a little on a whipsaw, you will preserve both the money and psychological strength to re-enter a trade. The third top or bottom has to be more shallow than the first but not necessarily the second.

The Hound of the Baskervilles

This signal occurs when a reliable chart or indicator pattern doesn’t lead to the action you expected and prices move in the opposite direction. A divergence may indicate that an uptrend is over, but if prices continue to rise, they give the Hound of the Baskervilles signal.

This signal is named after the story by Sir Arthur Conan Doyle in which Sherlock Holmes was called to investigate a murder at a country estate. He found the essential clue when he realized that the family dog didn’t bark while the murder was being committed. That meant the dog knew the criminal and the murder was an inside job. The signal was given by the lack of expected action—by the lack of barking!

When the market refuses to bark in response to a perfectly good signal, it gives you the Hound of the Baskervilles signal. This shows that something is fundamentally changing below the surface. Then it is time to get in gear with the new powerful trend.

I am not a fan of “stop-and-reverse” orders, but make an exception for the Hound of the Baskervilles. On those rare occasions when a bearish divergence aborts, I may go long. In the rare instances when a bullish divergence aborts, I look to go short.


Popular posts from this blog