What momentum means on a chart#
Momentum is the speed of price change, separate from its direction. A stock grinding up 0.1% a day and one jumping 3% a day are both in uptrends, but they are not the same situation. Momentum indicators measure how one-sided recent movement has been, and they flag when a move has become stretched or when its force is quietly fading while price still climbs.
Pyx ships the two canonical momentum tools: RSI and MACD. Both live in their own panel under the price chart rather than on top of it, because their units are not price units.
Neither one predicts. Both summarize the recent past in a way the raw price series makes hard to see. That summary is the entire value.
How RSI is calculated#
The Relative Strength Index, introduced by Welles Wilder in 1978, compares the size of recent up moves to the size of recent down moves and compresses the ratio into a 0 to 100 scale.
The computation runs in four steps. First, split each bar's change into a gain or a loss:
Second, average the gains and the losses over the period. Pyx seeds both averages with a simple average of the first 14 changes, then switches to Wilder smoothing, which blends each new value in at a weight of 1/14:
Third and fourth, take the ratio and rescale it:
When the window contains no losses at all, Pyx pins RSI at 100 rather than dividing by zero. The first reading appears after 14 bars of warm-up.
Reading RSI: 70, 50, and 30#
The conventional reading uses three lines:
| Level | Conventional meaning |
|---|---|
| Above 70 | Overbought. The last 14 bars were heavily up-dominated |
| Around 50 | Balance. Gains and losses roughly even |
| Below 30 | Oversold. The last 14 bars were heavily down-dominated |
Overbought does not mean "about to fall." It means the recent tape has been one-sided and the move is mature. Some traders also use the 50 line as a trend filter: RSI holding above 50 is consistent with an uptrend, below 50 with a downtrend.
The more interesting read is divergence. A bullish divergence forms when price prints a lower low but RSI prints a higher low, which says downside momentum faded even as price fell. The bearish version is the mirror image. Divergences describe fading force, not timing. They can persist across several swings before anything resolves.
In a strong uptrend RSI can sit above 70 for weeks. Treating that as an automatic sell signal is the classic expensive mistake. In a strong trend, the extreme reading is the trend signal.
How MACD is calculated#
Moving Average Convergence/Divergence, developed by Gerald Appel, turns two exponential moving averages into an oscillator. It has three parts:
The MACD line measures the gap between a fast and a slow EMA. When the fast EMA is above the slow one, MACD is positive, and the gap widens as a trend accelerates. The signal line smooths the MACD line, and the histogram is the distance between them. Under the default settings the MACD line starts around bar 26, once the slow EMA has warmed up.
What a MACD crossover means#
Three readings are conventional:
- Signal-line cross. MACD crossing above its signal line says momentum turned up relative to its own recent pace. Crossing below says the opposite. Crosses near the zero line carry more weight than crosses at stretched levels.
- Zero-line cross. MACD crossing above zero means the 12-bar EMA overtook the 26-bar EMA, which is a trend regime statement, not just a momentum one.
- Histogram slope. An expanding histogram means momentum is accelerating. A shrinking histogram while price keeps rising is the earliest warning that a trend is coasting on fumes. This is the same fading-force idea as RSI divergence, read a different way.
Where both indicators fail#
RSI and MACD share a failure mode: sideways markets. When price oscillates in a range, RSI shuttles between 40 and 60 and MACD wobbles around zero, generating frequent contradictory crossovers. Both are also lagging by construction. MACD is an EMA of EMAs, so a sharp V-shaped reversal will whip the signal-line cross badly, confirming the bottom well after it happened.
The defaults deserve honesty too. Wilder picked 14 and Appel picked 12, 26, 9 decades ago. They are conventions, not laws. They persist because everyone watches them, which gives the levels a mild self-fulfilling quality, not because the market owes them anything.
The productive use is corroboration. A price at resistance, an RSI divergence, and a shrinking MACD histogram are three independent descriptions of the same fading momentum. When they agree, the description is probably right. When they disagree, the chart is telling you it does not know yet.
Where to go next#
Add either indicator to a pane in the chart workspace. For the volatility side of the story, read Bollinger Bands, ATR, and drawdown.