Help/Cookbook

Trend Strength Scanner

Find stocks in strong sustained trends with multiple moving average alignment.

What It Detects

Stocks with:

  • Multiple moving averages in perfect alignment
  • Strong directional trend (up or down)
  • Price above/below key moving averages
  • Sustained momentum without overextension

The Formula

c > sma(20) and sma(20) > sma(50) and sma(50) > sma(200) and roc(20) > 10

How It Works

  1. c > sma(20) - Price above 20-day MA (short-term uptrend)
  2. sma(20) > sma(50) - 20-day above 50-day (medium-term uptrend)
  3. sma(50) > sma(200) - 50-day above 200-day (long-term uptrend)
  4. roc(20) > 10 - 10%+ gain in 20 days (momentum confirmation)

This creates a "staircase" pattern with all MAs trending higher.

When to Use

Best for:

  • Trend following strategies
  • Swing trading (hold 2-8 weeks)
  • Position trading (hold 2-6 months)
  • Finding established momentum plays

Avoid when:

  • Looking for reversal trades (this finds continuations)
  • Need immediate entry (stocks often extended)
  • Market in choppy sideways action
  • Seeking quick day trades

Why Trend Alignment Matters

The "Staircase" Effect

When all moving averages align properly:

  • Price > 20MA > 50MA > 200MA = All timeframes bullish
  • Institutional money accumulating
  • Retail following momentum
  • Algo trend-following systems engaged
  • Technical support layers stacked

What It Means

Strong uptrend:

  • Minimal pullbacks
  • Higher lows on consolidations
  • Volume increases on rallies
  • News often follows price (narrative justification)

Beware exhaustion:

  • RSI > 70 for extended periods
  • Vertical price spikes
  • Gap-ups on no news
  • Volume declining on new highs

Parameters You Can Tweak

Ultra-Strong Trend

c > ema(10) and ema(10) > ema(20) and ema(20) > ema(50) and ema(50) > ema(200) and roc(20) > 15
  • EMAs for faster reaction
  • 15%+ move in 20 days (very strong)
  • Catches explosive momentum stocks

Conservative Trend (Less Extended)

c > sma(20) and sma(20) > sma(50) and sma(50) > sma(200) and roc(20) > 5 and roc(20) < 15
  • 5-15% range (momentum without overextension)
  • Better entry timing
  • Lower risk of immediate pullback

Bearish Trend (Downtrend)

c < sma(20) and sma(20) < sma(50) and sma(50) < sma(200) and roc(20) < -10
  • Inverse alignment (downtrend)
  • For shorting or avoiding
  • All MAs acting as resistance

Trend + Volume

c > sma(20) and sma(20) > sma(50) and sma(50) > sma(200) and v > sma(v, 50) * 1.2
  • 20%+ above average volume
  • Confirms institutional participation
  • More sustainable trends

Large-Cap Only

c > sma(20) and sma(20) > sma(50) and sma(50) > sma(200) and roc(20) > 10 and f.market_cap > 10B
  • Blue-chip stocks only
  • Smoother, more reliable trends
  • Lower volatility

Example Columns to Add

Price: c
20MA: sma(20)
50MA: sma(50)
200MA: sma(200)
20-day %: roc(20)
52-week %: roc(252)
RSI: rsi(14)
ATR%: atrp(14)
Volume Ratio: v / sma(v, 50)

Entry Strategies

Pullback Entry (Conservative)

  1. Scan finds strong trend
  2. Wait for pullback to 20-day MA
  3. Watch for bullish reversal candle
  4. Enter when price bounces off 20-day MA
  5. Stop below 50-day MA
  6. Target: 10-20% or next resistance

Breakout Entry (Aggressive)

  1. Scan finds trend near consolidation breakout
  2. Enter on break of consolidation high
  3. Volume confirms (1.5x+ average)
  4. Stop below consolidation low
  5. Trail stop below 20-day MA

Continuation Entry (Medium Risk)

  1. Stock appears on scan
  2. Check RSI not > 75 (avoid overextension)
  3. Enter at current price
  4. Stop below 20-day MA (tight)
  5. Take partial profits at 10%, let rest run

Exit Strategies

Profit-Taking Signals:

  • 20-day crosses below 50-day (momentum fading)
  • RSI divergence (price higher, RSI lower)
  • ATR spike + big gap (climax move)
  • Hit predetermined target (15-25% typical)

Stop Loss Levels:

  • Tight: Below 20-day MA (3-5% typical)
  • Medium: Below 50-day MA (7-10% typical)
  • Wide: Below 200-day MA (position trading)

Warning Signs:

  • Volume declining on rallies
  • Price struggling to make new highs
  • 20-day MA flattening
  • Sector weakness appearing

Trend Quality Assessment

High Quality Trend

  • All MAs sloping upward (not flat)
  • 20-MA separation from 50-MA > 5%
  • 50-MA separation from 200-MA > 10%
  • RSI between 50-70 (momentum without exhaustion)
  • Volume increasing on up days
  • Sector also in uptrend

Low Quality Trend

  • Flat 200-day MA (no long-term direction)
  • Small separation between MAs (< 2%)
  • RSI > 75 extended (overbought)
  • Volume declining
  • Isolated move (sector weak)
  • Recent parabolic spike

What to Watch For

Strong trend signals:

  • First pullback to 20-MA after breakout
  • Consolidation with tightening range
  • Higher lows on each pullback
  • Pre-market showing strength
  • Sector rotation into this group

Warning signs:

  • Gap-up on minor news (exhaustion)
  • Multiple failed attempts at new high
  • Increasing volatility
  • Insider selling
  • Sector starting to roll over

Common Mistakes

  1. Chasing extended stocks - Wait for pullback if RSI > 70
  2. No stop loss - Even strong trends reverse eventually
  3. Ignoring market - Individual trends need market support
  4. Holding through MA breakdown - Exit when 20 crosses below 50
  5. Overleveraging - Strong trend ≠ risk-free trade
  6. Buying parabolic moves - Vertical moves = exhaustion coming
  7. Ignoring volume - Declining volume = trend losing steam

Combining with Other Indicators

Trend + RSI

c > sma(20) and sma(20) > sma(50) and sma(50) > sma(200) and rsi(14) > 50 and rsi(14) < 70

RSI confirms momentum without overbought condition

Trend + MACD

c > sma(20) and sma(20) > sma(50) and sma(50) > sma(200) and macd() > macd_signal() and macd_hist() > 0

MACD histogram positive = accelerating momentum

Trend + Bollinger Bands

c > sma(20) and sma(20) > sma(50) and sma(50) > sma(200) and c > bb_lower(20, 2) and c < bb_upper(20, 2)

Price within bands = not overextended

Trend + ATR Filter

c > sma(20) and sma(20) > sma(50) and sma(50) > sma(200) and atrp(14) > 1.5 and atrp(14) < 4

Moderate volatility = tradeable without excessive risk

Timeframe Considerations

Daily Charts (Standard)

  • Hold 2-8 weeks
  • Best for swing trading
  • Use 20/50/200-day MAs

Weekly Charts (Long-term)

  • Hold 3-12 months
  • Best for position trading
  • Use 10/20/40-week MAs
  • Filters out daily noise

4-Hour Charts (Aggressive)

  • Hold 3-10 days
  • Intraday trend following
  • Use 20/50/100 period MAs
  • More signals but noisier

Market Context (Critical!)

Trade trend stocks when:

  • SPY above 200-day MA
  • SPY showing MA alignment too
  • VIX < 25 (stable volatility)
  • Sector rotation happening

Avoid trend trades when:

  • SPY below 200-day MA (bear market)
  • SPY MAs misaligned (choppy)
  • VIX > 30 (high volatility breaks trends)
  • Market breadth negative

Individual stock trends need market tailwind to work.

Sector Rotation Strategy

Trend strength often appears in waves by sector:

Early Bull Market:

  • Technology
  • Consumer Discretionary
  • Financials

Mid Bull Market:

  • Industrials
  • Materials
  • Real Estate

Late Bull Market:

  • Energy
  • Healthcare
  • Utilities (defensive shift)

Run this scan on sector ETFs to identify rotation.

Position Management

Building Position

  1. Enter 25% on trend confirmation
  2. Add 25% on first successful pullback
  3. Add 25% if breaks to new high
  4. Keep 25% dry powder for deep pullback

Trailing Stops

  • Aggressive: Trail below 20-day MA
  • Conservative: Trail below 50-day MA
  • Hybrid: Start at 50-MA, move to 20-MA after 15% gain

Profit Taking

  • Take 25% at 10% gain
  • Take 25% at 20% gain
  • Let 50% run with trailing stop
  • Respect technical breakdown (20x50 MA cross)

Related Strategies

  • Golden Cross
On this page
What It DetectsThe FormulaHow It WorksWhen to UseWhy Trend Alignment MattersThe "Staircase" EffectWhat It MeansParameters You Can TweakUltra-Strong TrendConservative Trend (Less Extended)Bearish Trend (Downtrend)Trend + VolumeLarge-Cap OnlyExample Columns to AddEntry StrategiesPullback Entry (Conservative)Breakout Entry (Aggressive)Continuation Entry (Medium Risk)Exit StrategiesTrend Quality AssessmentHigh Quality TrendLow Quality TrendWhat to Watch ForCommon MistakesCombining with Other IndicatorsTrend + RSITrend + MACDTrend + Bollinger BandsTrend + ATR FilterTimeframe ConsiderationsDaily Charts (Standard)Weekly Charts (Long-term)4-Hour Charts (Aggressive)Market Context (Critical!)Sector Rotation StrategyPosition ManagementBuilding PositionTrailing StopsProfit TakingRelated Strategies
Previous
High Relative Volume Scanner

Was this article helpful? Let us know