A moving average ribbon plots several moving averages over the closing price, using different time windows to reveal trend strength. Narrow ribbons indicate consolidation; wide ribbons indicate stronger trends. section 10.2.2 section 10.4
Choose the averaging method and window according to the analysis goal:
- Use SMAs for slower, long-term trend analysis. section 10.2.2
- Use EMAs for quicker reactions and short-term strategies. section 10.2.2
- Use WMAs for signals that emphasize recent prices, or HMAs for smoother rapid-trend detection with reduced lag. section 10.2.2
Six-window ribbon
A Python workflow retrieves NVIDIA history with yfinance, calculates SMAs for 10, 20, 30, 40, 50, and 60 days using pandas rolling windows, and plots them with matplotlib. The ribbon contracts around May and October 2024, indicating market consolidation.
