Trend & Moving Averages
Moving averages and trend-following tools.
015-Day SMAA simple average of the last 5 closing prices.
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.
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.
Yahoo Finance, NSE
We compute a simple rolling mean of the last 5 daily closing prices. Updates every trading day.
- 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.
- Trading on 5MA crosses alone — too noisy.
- Using it for medium-term positions — 5 days is very short.
0210-Day SMAA simple average of the last 10 closing prices.
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.
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.
Yahoo Finance, NSE
Rolling 10-day mean of closing prices.
- Price above 10MA → short-term trend up.
- 5MA crossing above 10MA → early bullish signal.
- 10MA acting as support in an uptrend → healthy.
- Over-relying on the 5/10 crossover — frequent whipsaws.
- Comparing MA behaviour across stocks with different volatility.
0320-Day SMAA simple average of the last 20 closing prices — roughly one month of trading.
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.
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.
Yahoo Finance, NSE
Rolling 20-day mean of closing prices. Also used as the middle band of the Bollinger Bands.
- Price above 20MA → monthly trend is up.
- Slope up → trend accelerating; flat → consolidation.
- 20MA acting as support on pullbacks → bullish continuation likely.
- Treating 20MA as a hard line — prices often overshoot then return.
- Using 20MA in very volatile stocks — wider volatility needs wider windows.
0450-Day SMAA simple average of the last 50 closing prices — roughly two and a half months of trading.
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.
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.
Yahoo Finance, NSE
Rolling 50-day mean of closing prices.
- Price above 50MA → intermediate-term bullish.
- Price crossing below 50MA → warning of trend change.
- 50MA crossing above 200MA → Golden Cross.
- Assuming 50MA is precise — it's a slow-moving filter, not a trigger.
- Ignoring the slope — a flat 50MA gives weaker signals.
05200-Day SMAA simple average of the last 200 closing prices — roughly ten months of trading.
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.
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.
Yahoo Finance, NSE
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.
- Price above 200MA → long-term bull regime.
- Price below 200MA → long-term bear regime.
- 200MA slope up → sustained uptrend.
- Assuming being above 200MA means 'safe' — corrections happen within bull regimes.
- Using 200MA on young stocks — insufficient history makes it unreliable.
068-Day EMAAn exponential moving average of the last 8 closing prices.
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.
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.
Yahoo Finance, NSE
We use pandas' ewm method with span=8 and adjust=False. This matches the standard EMA computation used by charting platforms.
- Price above 8EMA → fast trend up.
- 8EMA above 21EMA → bullish alignment.
- 8EMA crossing above 21EMA → bullish signal.
- Using EMA on choppy markets — frequent whipsaws.
- Confusing EMA with SMA — EMA is more responsive.
079-Day EMAA 9-period exponential moving average.
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.
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.
Yahoo Finance, NSE
Pandas ewm with span=9, adjust=False. Standard EMA convention.
- 9EMA above 21EMA → bullish.
- 9EMA crossing above 21EMA → buy signal in trend-following systems.
- Works best in trending markets.
- Using 9/21 cross in a range — constant fake signals.
- Entering on the cross without confirming with volume.
0821-Day EMAA 21-period exponential moving average — the standard slow line in the 9/21 EMA crossover system.
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.
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.
Yahoo Finance, NSE
Pandas ewm with span=21, adjust=False.
- 9EMA above 21EMA → bullish regime.
- 21EMA as support in uptrend → continuation expected.
- 21EMA breaking down → trend change warning.
- Treating 21EMA as a hard floor — supports can break.
- Not adjusting expectations by volatility.
09Golden / Death CrossThe most famous trend signal in technical analysis.
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.
The Golden/Death Cross marks major regime changes. Institutional investors watch for it closely; many algorithmic strategies use it as a primary signal.
Computed
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'.
- 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.
- Trading the cross in real time — it's often late by design.
- Using it in choppy markets — frequent whipsaws.
10MA Ribbon CompressionA measure of how tightly the 5 moving averages (5, 10, 20, 50, 200) are bunched together, expressed as the coefficient of variation.
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.
When multiple moving averages squeeze together, the market is undecided. Historically, such compression is followed by an explosive move in either direction.
Computed
We compute the standard deviation of the 5 MAs, divide by their mean, and multiply by 100. Requires at least 200 days of history.
- 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.
- Assuming compression predicts direction — it only predicts magnitude.
- Acting on compression alone — wait for the breakout.
11MA Ribbon Compression SentimentCombines the magnitude of MA compression with the direction of price relative to the ribbon.
Combines the magnitude of MA compression with the direction of price relative to the ribbon. Turns the raw compression number into an actionable label.
Compression alone doesn't tell you which way the move will go. This sentiment does — by checking where price sits relative to the ribbon.
Computed
We classify compression magnitude into tiers, then check price direction relative to the highest and lowest of the 5 MAs.
- Positive + Bullish Breakout → strongest bullish setup.
- Negative + Bearish Breakdown → strongest bearish setup.
- Neutral + Inside Ribbon → still coiled; wait for breakout.
- Confusing compression with direction — always check both.
- Chasing a breakout without volume — false breakouts are common.
12MA SentimentA 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.
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.
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.
Computed
Combines three independent components: whether MAs are stacked correctly, whether they're rising or falling, and whether a major cross has just occurred.
- Very Positive → all MAs aligned bullishly, all rising.
- Positive → mostly bullish alignment.
- Neutral → mixed or consolidating.
- Negative → mostly bearish alignment.
- Assuming it flips quickly — MA sentiment moves slowly by design.
- Ignoring sub-components — a 'Positive' could hide a falling 200MA.
13EMA8 Trend SystemA 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.
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.
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.
Computed
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.
- 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.
- Trading on every flip — this can change frequently.
- Using it in isolation — combine with volume and momentum.
14MA Cross (9 vs 21 EMA)Tracks whether the 9-day EMA has crossed the 21-day EMA.
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.
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.
Computed
We track both EMAs and detect the moment their relationship flips. On the day of the flip, we label it as a Cross.
- Bullish Cross → potential entry signal.
- Bullish Alignment → trend is up; hold positions.
- Bearish Cross → potential exit signal.
- Bearish Alignment → trend is down.
- Trading every cross in choppy markets — many fakes.
- Ignoring the trend of the 21EMA.
