- Introduction
- Building Wilder’s Momentum Concept for Superior Trading Results
- Understanding Wilder’s Momentum Factor Calculation
- Wilder’s Entry Signal Rules
- Building Wilder’s Momentum Concept in ThinkScript
- Advanced Features and Customization
- Creating Momentum Shift Scans
- Combining Wilder's Concept with Modern Analysis
- The Trend Balance Point System
- Historical Context and Modern Relevance
Master Wilder’s Classic Momentum Trading Strategy
Discover how to translate J. Welles Wilder’s legendary 40-year-old momentum concept into a powerful ThinkOrSwim indicator that identifies momentum shifts before they become obvious to other traders.
This comprehensive tutorial teaches you to:
- Build Wilder’s momentum factor calculation using simple ThinkScript
- Identify precise long and short entry signals based on momentum acceleration
- Create custom scans to find stocks with shifting momentum patterns
- Apply classic momentum analysis to modern day trading strategies
Perfect for traders who want to combine time-tested momentum concepts with modern technical analysis tools.
Introduction
In today’s tutorial, we will translate a 40-year-old trading concept into a trading indicator for ThinkOrSwim.
This concept measures momentum by looking at the change in price over time. This momentum factor is the secret sauce, allowing you to spot changes in direction.
Here’s what we’ll discuss in this tutorial:
- Understand Wilder’s Momentum Concept
- Write thinkScript Code or Thinkorswim Indicator
- Translate the Indicator into a Scan
Let’s get started! A big thank you to Dorothy (fellow Volatility Box member), who discovered, researched and shared this concept with us. You can learn more about it in J. Weller’s book, New Concept in Technical Trading Systems (1978). You can find the concept on page 53 of the book.
Building Wilder’s Momentum Concept for Superior Trading Results
J. Welles Wilder Jr., the legendary technical analyst who gave us the RSI, Average True Range, and Parabolic SAR, also developed a powerful momentum concept that remains remarkably effective in today’s markets. Wilder’s Momentum Concept, detailed in his 1978 book “New Concepts in Technical Trading Systems,” provides a systematic approach to measuring momentum using the acceleration and deceleration of price movements.
This 40-year-old concept measures momentum by looking at the change in price over time, using what Wilder called the “momentum factor” – the secret sauce that allows traders to spot changes in direction before they become obvious. While many traders focus on complex indicators, Wilder’s approach proves that sometimes the most elegant solutions are also the most effective.
Understanding Wilder’s Momentum Factor Calculation
The foundation of Wilder’s Momentum Concept lies in the momentum factor calculation, which compares today’s closing price to the closing price from two days ago. This simple yet powerful calculation reveals the underlying acceleration or deceleration in price movement that often precedes major directional changes.
Here’s how the momentum factor works in practice:
Momentum Factor Formula:
Momentum Factor = Today's Close - Close from 2 Days Ago
Let’s examine a real-world example using 10 days of price data to understand how the momentum factor evolves:
| Day | Closing Price | Momentum Factor | Signal |
|---|---|---|---|
| 1 | $49.25 | – | Gathering Data |
| 2 | $49.75 | – | Gathering Data |
| 3 | $50.25 | +$1.00 | First Reading |
| 4 | $50.75 | +$1.00 | Momentum Maintained |
| 5 | $51.10 | +$0.85 | Momentum Decreasing |
| 6 | $50.75 | $0.00 | Momentum Neutral |
Notice how the momentum factor fluctuates as time progresses. On Day 5, we see the momentum factor decrease from +1.00 to +0.85, which often signals that the current upward momentum is beginning to exhaust itself.
Wilder’s Entry Signal Rules
Wilder established specific criteria for determining when momentum shifts warrant trading action. The key insight is that long and short signals have different requirements, reflecting the asymmetric nature of market movements.
Long Entry Signal:
Go long when today’s momentum factor is higher than either of the previous two days’ momentum factors. This “either/or” condition makes long signals more sensitive to positive momentum changes.
Short Entry Signal:
Go short when today’s momentum factor is lower than both of the previous two days’ momentum factors. This “both” requirement makes short signals more stringent, requiring stronger evidence of momentum deterioration.
This asymmetry reflects Wilder’s understanding that markets tend to fall faster than they rise, requiring more confirmation for short trades while allowing quicker entry into long positions during momentum acceleration.
Building Wilder’s Momentum Concept in ThinkScript
Translating Wilder’s concept into ThinkScript requires just a few lines of code, making it an excellent project for beginners learning ThinkOrSwim programming. The elegance of the original concept translates beautifully into modern trading platforms.
Step 1: Define the Momentum Factor
def momentumFactor = close - close[2];
This single line captures Wilder’s core calculation, comparing today’s closing price to the close from two bars ago. The [2] notation in ThinkScript refers to the value from two bars prior.
Step 2: Create Long Entry Conditions
def longMomentumEntry = if momentumFactor > momentumFactor[1] or
momentumFactor > momentumFactor[2]
then 1 else 0;
This code implements Wilder’s “either/or” rule for long entries, triggering when today’s momentum factor exceeds either of the previous two days’ readings.
Step 3: Create Short Entry Conditions
def shortMomentumEntry = if momentumFactor < momentumFactor[1] and
momentumFactor < momentumFactor[2]
then 1 else 0;
The short entry uses Wilder's more stringent "both" requirement, only triggering when today's momentum factor is less than both previous readings.
Step 4: Visual Implementation
plot longSignal = if longMomentumEntry then close else Double.NaN;
plot shortSignal = if shortMomentumEntry then close else Double.NaN;
longSignal.setPaintingStrategy(PaintingStrategy.POINTS);
shortSignal.setPaintingStrategy(PaintingStrategy.POINTS);
longSignal.setDefaultColor(Color.CYAN);
shortSignal.setDefaultColor(Color.MAGENTA);
This creates visual signals on your charts, plotting cyan dots for long entries and magenta dots for short entries at the closing prices where signals occur.
Advanced Features and Customization
Adding User Controls
Professional implementations include user inputs for customization:
input showMomentumFactor = yes;
input showMomentumBubbles = no;
AddChartBubble(showMomentumBubbles, close, momentumFactor,
if longMomentumEntry then Color.CYAN else Color.MAGENTA);
These inputs allow traders to toggle the display of momentum values and visual signals based on their preferences.
Color-Coded Momentum Display
Enhance the visual feedback by color-coding momentum bubbles based on current conditions:
AddChartBubble(showMomentumBubbles, close, momentumFactor,
if momentumFactor > momentumFactor[1] or momentumFactor > momentumFactor[2]
then Color.CYAN else Color.MAGENTA);
Creating Momentum Shift Scans
The real power of Wilder's concept emerges when you systematically scan for momentum shifts across entire market universes. Converting the indicator into a scan allows you to identify opportunities as they develop.
Basic Scan Structure:
def momentumFactor = close - close[2];
def longMomentumEntry = if momentumFactor > momentumFactor[1] or
momentumFactor > momentumFactor[2]
then 1 else 0;
plot signal = longMomentumEntry and !longMomentumEntry[1];
This scan identifies stocks where a long momentum signal triggered today but wasn't present yesterday, helping you catch momentum shifts as they occur.
Bearish Momentum Scan:
def shortMomentumEntry = if momentumFactor < momentumFactor[1] and
momentumFactor < momentumFactor[2]
then 1 else 0;
plot bearishShift = shortMomentumEntry and !shortMomentumEntry[1];
Similarly, this scan captures bearish momentum shifts, identifying stocks where selling pressure is accelerating according to Wilder's criteria.
Combining Wilder's Concept with Modern Analysis
Multi-Timeframe Momentum Analysis
Apply Wilder's concept across different timeframes for comprehensive momentum analysis:
- Daily charts: Identify swing trading opportunities and major trend changes
- Hourly charts: Fine-tune entries and exits for day trading
- 15-minute charts: Scalping opportunities with momentum confirmation
Integration with Volume Analysis
Combine momentum signals with volume confirmation for higher-probability setups. Momentum shifts supported by increasing volume often prove more reliable than those occurring on light volume.
Support and Resistance Confluence
The most powerful applications occur when Wilder's momentum signals align with key technical levels. Momentum shifts at major support or resistance often mark significant turning points.
The Trend Balance Point System
Wilder also developed the Trend Balance Point System, which reverse-engineers the momentum factor to determine what closing price is needed for a momentum signal to trigger. This advanced concept allows traders to set precise targets and stops based on momentum requirements.
Trend Balance Point Calculation:
The system calculates the exact closing price needed today for either a long or short momentum signal to trigger, allowing proactive position management rather than reactive signal-following.
Historical Context and Modern Relevance
J. Welles Wilder developed this concept in 1978, during an era when technical analysis was primarily done by hand with chart paper and calculators. The fact that his momentum concept translates so elegantly into modern algorithmic trading speaks to the timeless nature of his insights into market behavior.
Wilder's understanding of momentum psychology - that acceleration and deceleration in price movements reveal underlying shifts in market sentiment - remains as relevant today as it was four decades ago. High-frequency trading and modern market microstructure haven't changed these fundamental momentum dynamics.
# Wilder’s Momentum Concept for ThinkOrSwim
# Based on J. Welles Wilder’s 1978 “New Concepts in Technical Trading Systems”
# TOS Indicators – Full tutorial: tosindicators.com/indicators/wilders-momentum
# User input controls
input showMomentumFactor = yes;
// ... 50 more lines ...Here are some resources that you may find useful: