PART VI · Chapter 44 · 258 / 660

Lesson 258. When RSI and MACD signals overlap

Chapter 44. Combining Indicators into Repeatable Rule Components

You look at the chart of a stock rebounding from a bottom. RSI is above 50, MACD is above 0, and the close is above the 20-day line. All three indicators point toward buying, so can you buy more than usual?

Lesson 256 said that indicators drawn from the same price record are hard to count as independent evidence. This lesson checks that statement with numbers. It writes down the standard settings of RSI and MACD and calculates what the two indicators say in a steady trend and in a V-shaped rebound.

It then sets a way to judge whether adding one more indicator added new information. The basis for that judgment is a record of how many times your decisions changed before and after adding the indicator.

1. Both indicators are made from the same closes

RSI is an indicator J. Welles Wilder introduced in a 1978 book, and the default length Wilder proposed is 14 periods. The first average gain and average loss are simple averages of 14 changes. After that, they are updated the same way as the ATR of Lesson 257: (prior average × 13 + today's value) ÷ 14.

The formula of Lesson 250, RSI = 100 − 100 ÷ (1 + average gain ÷ average loss), rearranges into an easier shape to read.

RSI = 100 × average gain ÷ (average gain + average loss)

With an average gain of $1 and an average loss of $0.50, as in the example of Lesson 250, it is 100 × 1 ÷ 1.5 = 66.67. RSI is a number that shows what percent of recent movement was upward.

MACD is the 12-period exponential moving average (EMA) minus the 26-period EMA. The signal line is the 9-period EMA of MACD, and the histogram is MACD minus the signal line. An EMA gives today's price a weight of 2 ÷ (n + 1). For 12 periods that is 2 ÷ 13 = about 15.4%, for 26 periods 2 ÷ 27 = about 7.4%, and for 9 periods 2 ÷ 10 = 20%.

Indicator Standard setting Input data Question it answers
RSI 14 periods, Wilder method Changes in the close What share of recent movement was upward
MACD 12-period EMA − 26-period EMA Closes How far the short average is above the long average
Histogram MACD − 9-period signal line Closes Whether that gap is widening

The questions look different, but the input is the close alone in every case. Default settings and starting values can differ between charts, so write the length and the calculation method in the rule together.

2. In a steady trend, both restate the slope

In Lesson 257, a simple moving average lagged by (n − 1) ÷ 2 trading days in a steady trend. An EMA has the same lag. If the price rises steadily by s dollars a day, the 12-period EMA lags (12 − 1) ÷ 2 = 5.5 trading days and the 26-period EMA (26 − 1) ÷ 2 = 12.5 trading days. MACD widens by that difference.

MACD = s × (12.5 − 5.5) = 7 × s

If the price rises $1 a day, MACD levels off at about $7. The signal line follows to $7 too, so the histogram stays near 0. A MACD of $7 restates in dollars the fact that the price is rising $1 a day. Because it is in dollars, it grows with the stock's price, so to compare stocks, use the version converted to percent (PPO).

Now say the price repeats a rhythm of up $2, up $2, down $1. This is a hypothetical example. It rises $4 and falls $1 over three days, so the average gain settles at about $1.33 a day and the average loss settles at about $0.33. RSI stays near 100 × 4 ÷ (4 + 1) = 80, and since the net daily rise is $1, MACD stays near about $7.

The two numbers say one and the same thing. The price is climbing $1 a day on average, mostly on up days.

3. In a trending market, RSI overbought readings last a long time

Starting from $100 with the same rhythm, RSI is first computed on trading day 14. Of the 14 changes, gains total $20 and losses total $4, so the first RSI is 100 × 20 ÷ 24 = 83.33. After that it is updated with the Wilder method.

Line of the 14-period RSI of a hypothetical stock repeating a rhythm of up $2, up $2, down $1, from trading day 14 to trading day 44. The first RSI is 83.33, and it then moves between 78.39 and 83.02, never dropping below the overbought line of 70. Meanwhile the price rises about 25.9% from $116 to $146. Had you used RSI at 70 or above as a sell signal, you would have sold on the first day and missed the $30 rise.

While the price rises about 25.9% from $116 on trading day 14 to $146 on trading day 44, RSI never drops below 70; even at its lowest it is 78.39. As seen in Lesson 250, 95 is the line commonly marked as overbought. Had you used RSI at 70 or above as a sell signal, you would have sold at $116, where the first RSI appeared, and then only watched the $30 rise that followed.

For RSI to drop below 70, the average gain must become less than 7 ÷ 3 = about 2.33 times the average loss. On trading day 44, the average gain is about $1.39 and the average loss is about $0.31. If the price drops d dollars the next day, the average loss becomes (0.31 × 13 + d) ÷ 14, and this must exceed 3/7 of the reduced average gain, 1.39 × 13 ÷ 14. Rearranged, d > 1.39 × 13 × 3 ÷ 7 − 0.31 × 13 = about $3.7.

That means it takes a day close to four times the usual $1 drop to end the overbought reading. RSI measures the makeup of recent movement, not how high the price is. In a trend made mostly of up days, a high RSI is a record that there have been many up days so far, not a warning that the price is about to fall.

4. When signals overlap, it is one event seen with different lags

Use the V-shaped prices of Lesson 257 again. A hypothetical stock bottoms at $90 and then rises $1 a day, but this time assume the $1-a-day decline lasted much longer than 50 trading days. Then at the bottom, the average gain is 0, the average loss $1, and MACD settles at −$7.

After the bottom only up days follow, so the average gain plus the average loss stays at $1. So RSI on trading day k is 100 × (1 − (13 ÷ 14) to the k-th power). It is 48.67 on trading day 9 and 52.34 on trading day 10, so RSI passes 50 on trading day 10. Updating the two EMAs day by day, MACD is −$0.45 on trading day 14 and $0.02 on trading day 15, so it passes 0 on trading day 15.

Signal First day on after the bottom Close that day
Histogram above 0 Trading day 1 $91
RSI above 30 Trading day 5 $95
Close above the 20-day line (Lesson 257) Trading day 6 $96
RSI above 50 Trading day 10 $100
MACD above 0 Trading day 15 $105

Five signals turned on one after another, but only one new fact was learned: after the bottom the price rose $1 every day. Each indicator reported that fact with a different average length, on a different day. Trading day 15, when MACD passes 0, is the same day as the 50-day line signal seen in Lesson 257. Real prices are not this straight, so the dates differ, but the structure is the same: the longer an indicator's average, the later it turns on.

Two things follow. One is that agreement among signals means time has passed more than it means confirmation. The other is that in this example, a rule that waits for every indicator to turn on is the same as a rule that uses only the slowest one. Require the histogram, RSI 50 and MACD 0 together, and the entry is on trading day 15 at $105, the same day as using MACD alone.

If you raise the loss budget from the $500 of Lesson 276 to three times, $1,500, because all three indicators are on, you lose three times as much when a single judgment about the bottom is wrong. That is because the three votes came from one event.

5. Before adding an indicator, judge whether it is new information

Ask three questions about whether a new indicator adds information.

  1. Is the input data different? See whether it uses only closes, or other data such as volume (Lesson 246), strength relative to the market (Lesson 245) or earnings.
  2. Is the time frame different? See whether it is a 2- to 6-week average on the same daily candles or a different time frame such as weekly candles (Lesson 261).
  3. Did it change decisions in your past records? Count how many decisions differ before and after adding the condition.

Answer the third question with records. For example, say you have 40 past signals from the filter and signal of Lesson 257. This is a hypothetical record. Add conditions one at a time and count how many decisions changed.

Added condition Signals passed Signals whose decision changed Share changed
RSI above 50 37 signals 3 signals 3 ÷ 40 = 7.5%
MACD above 0 33 signals 7 signals 7 ÷ 40 = 17.5%
Breakout-day volume at least 1.5 times the 50-day average 22 signals 18 signals 18 ÷ 40 = 45%

In this record, the RSI condition changes only 3 of the 40. As seen in section 4, signals come after the price has already risen, so RSI is likely to be above 50 by then too. For the 7 the MACD condition changed, check the dates first to see whether it blocked the signal or delayed it by a few days. If it reports the same event later, as in section 4, it is not new information.

The volume condition changes 18. It is data outside the close, so it may be new information. But changing many decisions means the information is different, not that it is good. You must compare the later results of the 18 changed signals separately with the remaining 22, and Lesson 306 covers how to compare. If only 3 changed, there is not even a sample to compare results with.

6. Write down in advance the rules for when signals overlap

Attach the results of the judgment to the rule card. For example, like this.

One momentum vote: treat RSI(14) and MACD(12, 26, 9) as the same close-based information and use only one of them to check state. Overbought: in a trend where the filter is open, do not use RSI at 70 or above as a reason to sell; exit by the stop-loss and exit levels set in advance. Agreement: do not change quantity by the number of agreeing indicators; use the Lesson 276 limits. Additions: add a new indicator only if its input or time frame differs and after recording the decisions it changed in past signals and their results.

The records for this lesson are this rule card and an indicator addition log. In the log, write one line per signal with the date, the stock, the decision before the addition, the decision after it, whether it changed, and the later result. As the share changed and the results pile up, decide whether to add or drop that indicator.

Try it yourself

  1. Find the RSI of a stock with an average gain of $0.90 and an average loss of $0.60 using the formula of section 1. For RSI to be 30, how many times the average loss must the average gain be?
  2. Two hypothetical stocks rise steadily by the same amount every day. The $50 stock rises $0.50 a day and the $400 stock $4 a day, both 1% of the current share price. Find the MACD of each with the formula of section 2, then divide each by its current share price and compare.
  3. In the V-shaped prices of section 4, if you use RSI above 30 and the close above the 20-day line together as the entry condition, when and at what price do you enter? Which of the two conditions sets the entry day?
  4. Adding conditions one at a time to 25 past signals left 23 with the RSI above 50 condition, 19 with the MACD above 0 condition, and 13 with an earnings condition that last quarter's revenue growth was higher than the quarter before. Find the share of decisions each condition changed, and write what you would check next.

Answers

First, 100 × 0.90 ÷ (0.90 + 0.60) = 60. At RSI 30, the upward share is 30% of all movement, so average gain ÷ average loss = 30 ÷ 70 = about 0.43 times.

Second, the $50 stock is 7 × 0.50 = $3.50 and the $400 stock 7 × 4 = $28. The MACDs differ eightfold, but divided by the share price they are the same: 3.50 ÷ 50 × 100 = 7% and 28 ÷ 400 × 100 = 7%. The trends move at the same speed, yet looking only at MACD in dollars, the $400 stock looks much stronger.

Third, RSI passes 30 on trading day 5, but that day's close of $95 is below the 20-day line at $96. The first day both conditions are met is trading day 6 at $96, so the 20-day line condition sets the entry day. On this price path, the RSI 30 condition did not change a single decision.

Fourth, the RSI condition changes 2 ÷ 25 = 8%, the MACD condition 6 ÷ 25 = 24%, and the earnings condition 12 ÷ 25 = 48%. The RSI condition changes almost no decisions, so do not add it. For the 6 changed by MACD, look at the dates to see whether it blocked or delayed the signal. The earnings condition uses data outside the close, so it is the most likely to be new information. But until you compare the later results of the 12 changed signals with the remaining 13, do not add it to the rule; just keep recording.

Related lessons