Master Market Stage Analysis with the Market Pulse Indicator
Discover how to build a comprehensive market analysis tool that automatically identifies which of the 4 market stages you’re currently trading in.
This advanced tutorial teaches you to create:
- Volume Weighted Moving Average (VWMA) system
- Variable Moving Average with volatility adjustment
- 4 Market Stages detection: Acceleration, Distribution, Deceleration, Accumulation
- Automated scans for stage transitions
- Multi-symbol utility labels for market overview
- TRIN and Put/Call ratio integration
Whether you’re trading options, stocks, or ETFs, this indicator helps you adapt your strategy to current market conditions and identify the most profitable opportunities.
Building the Market Pulse Indicator in ThinkOrSwim
If you’ve ever wondered why your bullish trades keep getting wrecked in a choppy market, or why your puts expire worthless during strong uptrends, you’re not alone. Most traders make the mistake of using the same strategies regardless of market conditions. The Market Pulse indicator fixes this by telling you exactly what type of market you’re trading in.
The Problem with Most Trading Approaches
Here’s what typically happens: You see a setup that looks good, place your trade, and then watch the market do the opposite of what you expected. Sound familiar? The issue isn’t your setup—it’s that you’re using the wrong strategy for the current market environment.
Markets cycle through four distinct phases, and each one demands a completely different approach:
- Acceleration: Time to get aggressive with calls
- Distribution: Stick to neutral strategies like iron condors
- Deceleration: Put strategies work best
- Accumulation: Conservative buying opportunities
What Makes This Different from Regular Moving Averages
Volume Weighted Moving Average (VWMA)
Regular moving averages treat a quiet Tuesday the same as a massive volume spike on earnings day. That’s ridiculous. The VWMA actually weighs periods by volume, so when the S&P has 5x normal volume, it matters more in the calculation.
Think about it: if institutions are dumping millions of shares, shouldn’t that carry more weight than some low-volume drift? The VWMA captures this while regular MAs just shrug.
Variable Moving Average
This one’s clever—it automatically adjusts based on volatility. When the VIX is spiking and everything’s going crazy, it becomes more responsive. During quiet periods, it smooths out the noise. It’s like having a moving average that actually pays attention to market conditions.
The Four Market Stages (And What to Actually Do)
Acceleration Stage
You know you’re here when the 8, 21, and 34-period VWMAs are stacked like stairs going up, and price is above the variable MA. This is when Ron (one of the members who requested this tutorial) makes his money with Delta 30 calls.
What works: Long calls, call spreads, basically anything bullish. This is not the time to be cute with neutral strategies.
Distribution Stage
The moving averages stop stacking nicely and start getting messy. Price might be above the variable MA, but there’s no clear trend. This is when smart money is rotating positions and taking profits.
What works: Iron condors, strangles, anything that profits from the market going sideways. Avoid directional bets here—you’ll just get chopped up.
Deceleration Stage
Everything flips. The VWMAs stack downward (8 < 21 < 34) and price drops below the variable MA. Time to dust off those put strategies.
What works: Long puts, put spreads, short strategies. But be ready to take profits quickly—bear market rallies can be vicious.
Accumulation Stage
MAs aren’t stacked, price is below the variable MA, but smart money is quietly buying. This stage requires patience—the fireworks come later.
What works: Cash-secured puts, buying stock on weakness. Boring but profitable if you time the next acceleration phase.
Building the Indicator
The code isn’t complicated once you understand what’s happening:
# Volume Weighted Moving Averages
def VWMA8 = Sum(volume * close, 8) / Sum(volume, 8);
def VWMA21 = Sum(volume * close, 21) / Sum(volume, 21);
def VWMA34 = Sum(volume * close, 34) / Sum(volume, 34);
# Stage Detection
def bullish = VWMA8 > VWMA21 and VWMA21 > VWMA34;
def bearish = VWMA8 < VWMA21 and VWMA21 < VWMA34;
The magic happens when you combine this with the variable MA to determine which of the four stages you're in. The indicator colors everything for you—green for acceleration, red for deceleration, yellow for accumulation, orange for distribution.
Adding Market Breadth (Because Context Matters)
Individual stocks can lie, but the TRIN and put/call ratio don't. When TRIN hits 2.0+, institutions are panic selling (usually a good thing for buyers). When it drops below 0.5, everyone's getting too bullish.
Same with the put/call ratio. The 10-day average above 1.0 means too much fear, below 0.85 means too much greed. These levels give you context for whether your individual setups align with broader market sentiment.
The Scanning Setup That Actually Works
Here's where it gets interesting. You can scan for the exact moment when stages change:
# Accumulation to Acceleration
plot signal = bullish and close >= VMA and !bullish[1];
# Distribution to Deceleration
plot signal = bearish and close <= VMA and !bearish[1];
These transitions are where the money is made. Think about it—you're catching the shift right as it happens, not after everyone else notices.
Real Trading Applications
Let's say XLU shows up in your accumulation-to-acceleration scan. You check the chart, confirm the stage change, and grab some calls. That's exactly what happened in the tutorial video—XLU was transitioning, and anyone paying attention could have caught that move.
Or maybe the scan shows Netflix moving into deceleration. Time to look at put spreads or just stay away if you're primarily bullish.
The utility labels show you everything at once—SPY, QQQ, sector ETFs, all color-coded by stage. You can immediately see that tech might be accelerating while financials are decelerating. That's valuable information for position sizing and sector selection.
What Usually Goes Wrong
The biggest mistake? Fighting the stage. I've seen traders buying calls during clear deceleration phases because "the chart looks good." The chart might look good, but the market structure is telling you something different.
Another common error is ignoring the transitions. Those stage changes are where the biggest moves happen, but most people don't notice until it's too late. By then, the easy money is gone.
Also, don't overtrade during distribution phases. Sometimes the best move is no move. The market will give you better opportunities when it shifts into acceleration or deceleration.
Testing Your Results
Use ThinkOrSwim's OnDemand to backtest these signals. Pick a date, see what stage the market was in, and track what happened over the next few weeks. You'll start to see patterns—acceleration phases often lead to 3-5% moves in major indices within 1-2 weeks.
The tutorial showed exactly this process with XL RE. The stage transition signal appeared, and you could track the subsequent options performance using historical data. That's how you build confidence in the system.
Making It Work for Your Account Size
Whether you're trading with $5K or $500K, the stages are the same. Smaller accounts might focus on single-leg options during clear acceleration/deceleration phases. Larger accounts can use spreads and more complex strategies.
The key is matching your strategy to the current stage, not your account size. A $5K account using the right strategy in acceleration will outperform a $500K account fighting the market structure.
Start simple: identify the current stage, pick appropriate strategies, and gradually add the scanning features as you get comfortable. The multi-symbol labels alone will change how you view the market—instead of guessing what's happening, you'll know.
#TOS Indicators
#Home of the Volatility Box
#More info regarding this indicator here: tosindicators.com/indicators/market-pulse
#Code written in 2019
#Full Youtube Tutorial here: https://youtu.be/Hku6dLR-m_A
// ... 50 more lines ...Here are some resources that you may find useful: