Stockenza Method
Section · 14 metrics

Trend & Moving Averages

Moving averages and trend-following tools.

01
5-Day SMA
A simple average of the last 5 closing prices.
💡 The Idea

A simple average of the last 5 closing prices. It's the fastest moving average we track, hugging the price closely and turning quickly on short-term moves.

❓ Why It Matters

Short-term traders use the 5-day MA as a proxy for immediate price direction. When price is above the 5MA, momentum is up; below, momentum is down. It reacts fast — which is both its strength and its weakness.

📐 The Formula
5MA = (Close₁ + Close₂ + Close₃ + Close₄ + Close₅) ÷ 5
🔌 Data Sources

Yahoo Finance, NSE

🔬 How We Compute It

We compute a simple rolling mean of the last 5 daily closing prices. Updates every trading day.

📊 How to Read It
  • Price above 5MA → short-term bullish.
  • Price crossing above 5MA → possible short-term entry.
  • Price whipsawing around 5MA → choppy, low-conviction market.
  • Best used with longer MAs — never in isolation.
⚠️ Common Mistakes
  1. Trading on 5MA crosses alone — too noisy.
  2. Using it for medium-term positions — 5 days is very short.
🔗 Related Metrics
02
10-Day SMA
A simple average of the last 10 closing prices.
💡 The Idea

A simple average of the last 10 closing prices. It sits between the fast 5-day and the slower 20-day, offering a middle view of short-term trend.

❓ Why It Matters

The 10MA smooths out the worst of the daily noise while still reacting within a couple of weeks. Common crossover partner with the 5MA for short-term swing setups.

📐 The Formula
10MA = Sum of last 10 closing prices ÷ 10
🔌 Data Sources

Yahoo Finance, NSE

🔬 How We Compute It

Rolling 10-day mean of closing prices.

📊 How to Read It
  • Price above 10MA → short-term trend up.
  • 5MA crossing above 10MA → early bullish signal.
  • 10MA acting as support in an uptrend → healthy.
⚠️ Common Mistakes
  1. Over-relying on the 5/10 crossover — frequent whipsaws.
  2. Comparing MA behaviour across stocks with different volatility.
🔗 Related Metrics
03
20-Day SMA
A simple average of the last 20 closing prices — roughly one month of trading.
💡 The Idea

A simple average of the last 20 closing prices — roughly one month of trading. It's the classic intermediate-term trend line, and also the middle band of the Bollinger Bands.

❓ Why It Matters

The 20MA is one of the most-watched lines on any chart. Swing traders use it as the trend filter: above it, look for longs; below, look for shorts. Its slope defines the direction of the monthly trend.

📐 The Formula
20MA = Sum of last 20 closing prices ÷ 20
🔌 Data Sources

Yahoo Finance, NSE

🔬 How We Compute It

Rolling 20-day mean of closing prices. Also used as the middle band of the Bollinger Bands.

📊 How to Read It
  • Price above 20MA → monthly trend is up.
  • Slope up → trend accelerating; flat → consolidation.
  • 20MA acting as support on pullbacks → bullish continuation likely.
⚠️ Common Mistakes
  1. Treating 20MA as a hard line — prices often overshoot then return.
  2. Using 20MA in very volatile stocks — wider volatility needs wider windows.
🔗 Related Metrics
04
50-Day SMA
A simple average of the last 50 closing prices — roughly two and a half months of trading.
💡 The Idea

A simple average of the last 50 closing prices — roughly two and a half months of trading. It's the standard intermediate-term trend filter used by institutional investors.

❓ Why It Matters

The 50MA is a key decision line. Price above it is considered a bull regime; below, a bear regime. Many trend-following systems use it as the primary signal.

📐 The Formula
50MA = Sum of last 50 closing prices ÷ 50
🔌 Data Sources

Yahoo Finance, NSE

🔬 How We Compute It

Rolling 50-day mean of closing prices.

📊 How to Read It
  • Price above 50MA → intermediate-term bullish.
  • Price crossing below 50MA → warning of trend change.
  • 50MA crossing above 200MA → Golden Cross.
⚠️ Common Mistakes
  1. Assuming 50MA is precise — it's a slow-moving filter, not a trigger.
  2. Ignoring the slope — a flat 50MA gives weaker signals.
05
200-Day SMA
A simple average of the last 200 closing prices — roughly ten months of trading.
💡 The Idea

A simple average of the last 200 closing prices — roughly ten months of trading. It's the single most-watched long-term trend line in technical analysis.

❓ Why It Matters

The 200MA divides markets into bull and bear regimes. Institutions use it as the primary filter for portfolio positioning. The 50/200 cross is the most famous signal in technical analysis.

📐 The Formula
200MA = Sum of last 200 closing prices ÷ 200
🔌 Data Sources

Yahoo Finance, NSE

🔬 How We Compute It

Rolling 200-day mean of closing prices. Requires at least 200 days of history — newly listed stocks won't have a value here for a while.

📊 How to Read It
  • Price above 200MA → long-term bull regime.
  • Price below 200MA → long-term bear regime.
  • 200MA slope up → sustained uptrend.
⚠️ Common Mistakes
  1. Assuming being above 200MA means 'safe' — corrections happen within bull regimes.
  2. Using 200MA on young stocks — insufficient history makes it unreliable.
06
8-Day EMA
An exponential moving average of the last 8 closing prices.
💡 The Idea

An exponential moving average of the last 8 closing prices. Unlike an SMA, the EMA gives more weight to recent prices, so it reacts faster to fresh moves.

❓ Why It Matters

The 8-day EMA is one of the standard fast EMAs in trend systems. Used in the popular 8/21 EMA crossover setup — a classic short-term trend signal.

📐 The Formula
8D_EMA = EMA of Close over 8 periods α = 2 ÷ (8 + 1) = 0.2222
🔌 Data Sources

Yahoo Finance, NSE

🔬 How We Compute It

We use pandas' ewm method with span=8 and adjust=False. This matches the standard EMA computation used by charting platforms.

📊 How to Read It
  • Price above 8EMA → fast trend up.
  • 8EMA above 21EMA → bullish alignment.
  • 8EMA crossing above 21EMA → bullish signal.
⚠️ Common Mistakes
  1. Using EMA on choppy markets — frequent whipsaws.
  2. Confusing EMA with SMA — EMA is more responsive.
🔗 Related Metrics
07
9-Day EMA
A 9-period exponential moving average.
💡 The Idea

A 9-period exponential moving average. It's a slightly smoother version of the 8-day EMA and is the standard fast line in the 9/21 EMA crossover strategy.

❓ Why It Matters

The 9/21 EMA pair is widely used as a short-term trend system. The 9/21 cross often precedes a larger move — the faster line leads, the slower confirms.

📐 The Formula
9D_EMA = EMA of Close over 9 periods, with α = 2 ÷ (9 + 1) = 0.2
🔌 Data Sources

Yahoo Finance, NSE

🔬 How We Compute It

Pandas ewm with span=9, adjust=False. Standard EMA convention.

📊 How to Read It
  • 9EMA above 21EMA → bullish.
  • 9EMA crossing above 21EMA → buy signal in trend-following systems.
  • Works best in trending markets.
⚠️ Common Mistakes
  1. Using 9/21 cross in a range — constant fake signals.
  2. Entering on the cross without confirming with volume.
08
21-Day EMA
A 21-period exponential moving average — the standard slow line in the 9/21 EMA crossover system.
💡 The Idea

A 21-period exponential moving average — the standard slow line in the 9/21 EMA crossover system. Captures roughly one month of trend with more weight on recent prices.

❓ Why It Matters

The 21EMA defines the medium-term trend in many swing systems. When the 9EMA is above the 21EMA, the market is considered bullish; when below, bearish.

📐 The Formula
21D_EMA = EMA of Close over 21 periods, with α = 2 ÷ (21 + 1) = 0.0909
🔌 Data Sources

Yahoo Finance, NSE

🔬 How We Compute It

Pandas ewm with span=21, adjust=False.

📊 How to Read It
  • 9EMA above 21EMA → bullish regime.
  • 21EMA as support in uptrend → continuation expected.
  • 21EMA breaking down → trend change warning.
⚠️ Common Mistakes
  1. Treating 21EMA as a hard floor — supports can break.
  2. Not adjusting expectations by volatility.
09
Golden / Death Cross
The most famous trend signal in technical analysis.
💡 The Idea

The most famous trend signal in technical analysis. A Golden Cross occurs when the 50-day MA crosses above the 200-day MA — a long-term bullish signal. A Death Cross is the opposite.

❓ Why It Matters

The Golden/Death Cross marks major regime changes. Institutional investors watch for it closely; many algorithmic strategies use it as a primary signal.

📐 The Formula
Golden Cross: 50MA crosses ABOVE 200MA on the current bar Death Cross: 50MA crosses BELOW 200MA on the current bar Event-based — fires only on the actual cross day.
🔌 Data Sources

Computed

🔬 How We Compute It

We track the 50-day and 200-day SMAs on every bar. When the 50MA crosses the 200MA, we flag a Golden or Death Cross. On other days, the label is 'No Cross'.

📊 How to Read It
  • Golden Cross → regime turning bullish; consider adding exposure.
  • Death Cross → regime turning bearish; consider reducing risk.
  • Late signal — often fires well after the actual bottom.
⚠️ Common Mistakes
  1. Trading the cross in real time — it's often late by design.
  2. Using it in choppy markets — frequent whipsaws.
🔗 Related Metrics
10
MA Ribbon Compression
A measure of how tightly the 5 moving averages (5, 10, 20, 50, 200) are bunched together, expressed as the coefficient of variation.
💡 The Idea

A measure of how tightly the 5 moving averages (5, 10, 20, 50, 200) are bunched together, expressed as the coefficient of variation. Low values mean compression — often a precursor to a big move.

❓ Why It Matters

When multiple moving averages squeeze together, the market is undecided. Historically, such compression is followed by an explosive move in either direction.

📐 The Formula
MA_RibbonCompression = (Standard Deviation of the 5 MAs ÷ Mean of the 5 MAs) × 100
🔌 Data Sources

Computed

🔬 How We Compute It

We compute the standard deviation of the 5 MAs, divide by their mean, and multiply by 100. Requires at least 200 days of history.

📊 How to Read It
  • Below 0.5 → extreme compression — watch for breakout.
  • 0.5 to 1.5 → strong compression.
  • 1.5 to 2.5 → moderate compression.
  • Above 3.5 → no compression.
⚠️ Common Mistakes
  1. Assuming compression predicts direction — it only predicts magnitude.
  2. Acting on compression alone — wait for the breakout.
11
MA Ribbon Compression Sentiment
Combines the magnitude of MA compression with the direction of price relative to the ribbon.
💡 The Idea

Combines the magnitude of MA compression with the direction of price relative to the ribbon. Turns the raw compression number into an actionable label.

❓ Why It Matters

Compression alone doesn't tell you which way the move will go. This sentiment does — by checking where price sits relative to the ribbon.

📐 The Formula
Magnitude tier: ≤0.5 Extreme, ≤1.5 Strong, ≤2.5 Moderate, ≤3.5 Mild, >3.5 None Direction: Price > max MAs → Bullish; Price < min MAs → Bearish; else Inside
🔌 Data Sources

Computed

🔬 How We Compute It

We classify compression magnitude into tiers, then check price direction relative to the highest and lowest of the 5 MAs.

📊 How to Read It
  • Positive + Bullish Breakout → strongest bullish setup.
  • Negative + Bearish Breakdown → strongest bearish setup.
  • Neutral + Inside Ribbon → still coiled; wait for breakout.
⚠️ Common Mistakes
  1. Confusing compression with direction — always check both.
  2. Chasing a breakout without volume — false breakouts are common.
12
MA Sentiment
A composite reading of the trend system that combines the alignment of the moving averages, their direction (rising or falling), and any recent Golden/Death Cross into a single label.
💡 The Idea

A composite reading of the trend system that combines the alignment of the moving averages, their direction (rising or falling), and any recent Golden/Death Cross into a single label.

❓ Why It Matters

Individual moving averages say different things. The MA Sentiment blends them into one clear verdict so you don't have to mentally weigh five lines.

📐 The Formula
Term 1: MA alignment voting (range −3 to +3) Term 2: MA direction voting (range −2.25 to +2.25) Term 3: Golden/Death Cross event (−2 to +2) Total Score range roughly −7.25 to +7.25 ≥ 5.5 → Very Positive ≥ 2.5 → Positive ≥ −2.5 → Neutral ≥ −5.5 → Negative else → Very Negative
🔌 Data Sources

Computed

🔬 How We Compute It

Combines three independent components: whether MAs are stacked correctly, whether they're rising or falling, and whether a major cross has just occurred.

📊 How to Read It
  • Very Positive → all MAs aligned bullishly, all rising.
  • Positive → mostly bullish alignment.
  • Neutral → mixed or consolidating.
  • Negative → mostly bearish alignment.
⚠️ Common Mistakes
  1. Assuming it flips quickly — MA sentiment moves slowly by design.
  2. Ignoring sub-components — a 'Positive' could hide a falling 200MA.
13
EMA8 Trend System
A simple, always-informative trend state based on where the close sits relative to the 8-day EMA and where the 8-day EMA sits relative to the 21-day EMA.
💡 The Idea

A simple, always-informative trend state based on where the close sits relative to the 8-day EMA and where the 8-day EMA sits relative to the 21-day EMA.

❓ Why It Matters

Crossover signals fire rarely — you can go weeks without one. The EMA8 Trend System fills that gap by giving you a trend read on every bar.

📐 The Formula
Very Positive → Close > EMA8 AND EMA8 > EMA21 Very Negative → Close < EMA8 AND EMA8 < EMA21 Positive → EMA8 > EMA21 (mild bullish) Negative → EMA8 < EMA21 (mild bearish) Neutral → EMAs converging
🔌 Data Sources

Computed

🔬 How We Compute It

We compare the current close to the 8-period EMA and the 8EMA to the 21EMA. Four combinations possible; the label reads out which one is currently true.

📊 How to Read It
  • Very Positive → strong alignment — bulls in control.
  • Positive → mild bullish bias.
  • Neutral → EMAs converging — trend unclear.
  • Negative → mild bearish bias.
  • Very Negative → strong bearish alignment.
⚠️ Common Mistakes
  1. Trading on every flip — this can change frequently.
  2. Using it in isolation — combine with volume and momentum.
🔗 Related Metrics
14
MA Cross (9 vs 21 EMA)
Tracks whether the 9-day EMA has crossed the 21-day EMA.
💡 The Idea

Tracks whether the 9-day EMA has crossed the 21-day EMA. Fires a 'Bullish Cross' or 'Bearish Cross' on the exact day, then shows ongoing state on subsequent days.

❓ Why It Matters

The 9/21 EMA cross is one of the most popular short-term trend systems. Unlike the Golden Cross, it fires frequently enough to be tradeable.

📐 The Formula
Bullish Cross → 9EMA crosses above 21EMA on current bar Bearish Cross → 9EMA crosses below 21EMA on current bar Bullish Alignment → 9EMA currently above 21EMA Bearish Alignment → 9EMA currently below 21EMA
🔌 Data Sources

Computed

🔬 How We Compute It

We track both EMAs and detect the moment their relationship flips. On the day of the flip, we label it as a Cross.

📊 How to Read It
  • Bullish Cross → potential entry signal.
  • Bullish Alignment → trend is up; hold positions.
  • Bearish Cross → potential exit signal.
  • Bearish Alignment → trend is down.
⚠️ Common Mistakes
  1. Trading every cross in choppy markets — many fakes.
  2. Ignoring the trend of the 21EMA.