Skip to main content Supply Demand Edge Indicator ThinkOrSwim Skip to main content Skip to content
Master the TTM Squeeze with our comprehensive 19-module course Start Learning →
TOS Indicators
  • Tools

    Categories

    • Indicators
    • Backtesters
    • Scans
    • Dashboards
    • thinkScript
    • Member Resources
    Browse Full Library

    Featured Tutorials

    Heiken Ashi Trend Indicator
    Heiken Ashi Trend Indicator
    Indicators

    Download our Custom Heiken Ashi indicator for ThinkOrSwim. Full ThinkScript code, formula...

    Learn more →
    Commodities Tracker
    Commodities Tracker
    Indicators

    For acceleration signals: trend-following strategies and buying pullbacks. For deceleration signals: short...

    Learn more →
    Build an Election Backtester in 10 Minutes
    Build an Election Backtester in 10 Minutes
    Backtesters

    Learn how to create a Post-Election Backtester in ThinkOrSwim to analyze market...

    Learn more →

    Popular Posts

    Unusual Volume
    Unusual Volume
    Scans

    Build 4 scans to easily find stocks with greater than...

    Learn more →
    Upcoming Earnings with High Short Interest
    Upcoming Earnings with High Short Interest
    Scans

    Build a scan to find stocks that are likely to...

    Learn more →
    Unusual Volume Pro Scans
    Unusual Volume Pro Scans
    Scans

    4 additional scans to find unusual volume overlapping with key...

    Learn more →
  • Courses
    Squeeze Course
    Squeeze Course
    19 Modules

    Scan, backtest, and trade the TTM Squeeze setup with precision.

    Unlock Course →
    Earnings Course
    Earnings Course
    3 Modules

    Master earnings plays with free indicators and proven strategies for ThinkOrSwim.

    Unlock Course →
    V-Shaped Reversals
    V-Shaped Reversals
    7 Modules

    Identify and trade powerful V-shaped reversal patterns with confidence and precision.

    Unlock Course →
    Fibonacci Trading
    Fibonacci Trading
    4 Modules

    Learn to trade Fibonacci retracements and extensions in ThinkOrSwim effectively.

    Unlock Course →
  • Products
    Futures Volatility Box Premium
    Futures Volatility Box

    Volatility models for 10 major futures markets, including micros & SPX.

    Explore Futures VB →
    Stock Volatility Box Premium
    Stock Volatility Box

    Dynamic support & resistance for 595+ stocks/ETFs, with a live scanner.

    Explore Stock VB →
    Opening Range Breakouts Premium
    Opening Range Breakouts

    Powerful live scanner & backtester for ORB strategies on 595+ stocks.

    Explore ORB Setups →
My Account
Back to Tutorials
Beginner-Friendly 20 mins ThinkOrSwim

Supply Demand Edge

Easily spot supply/demand imbalances in the marketplace, and identify divergences that you can leverage in your trading.

Download Indicator
How to install in ThinkOrSwim →
Table of Contents
  • Supply Demand Edge Indicator for ThinkOrSwim
  • Understanding Market Breadth and Supply/Demand Dynamics
  • The Power of NYSE TICK Analysis
  • Advance/Decline Spread Divergence Analysis
  • Building the High/Low Tracking Framework
  • Divergence Detection Logic and Signal Generation
  • Customization and Display Options
  • Integration with Volatility and Overbought/Oversold Analysis
  • Practical Trading Applications and Strategy Development
  • Timeframe Optimization and Performance Considerations
  • Market Condition Adaptability
  • Advanced Signal Interpretation Techniques
  • Risk Management and Position Sizing
  • Conclusion: Leveraging Market Imbalances for Trading Success

Build a Supply Demand Edge Indicator for Market Imbalance Detection

Discover how to create a powerful Supply Demand Edge indicator that spots market imbalances before they become obvious to other traders using NYSE TICK and Advance/Decline divergence analysis.

This comprehensive tutorial teaches you to build an indicator featuring:

  • NYSE TICK divergence detection for buying/selling pressure analysis
  • Advance/Decline spread divergence identification
  • High-of-day and low-of-day tracking with regular session logic
  • Visual arrow signals for both long and short opportunities
  • Customizable display options for TICK and A/D signals
  • Extended hours compatibility

Perfect for traders looking to identify reversal opportunities in overbought/oversold zones or when combined with volatility-based indicators like the Volatility Box models. Note: This Supply Demand Edge indicator is distinct from the Edge Signals indicator, which serves as an advanced overbought/oversold confirmation tool exclusively available to Volatility Box members.

Supply Demand Edge Indicator for ThinkOrSwim

Market timing often comes down to understanding one fundamental concept: supply and demand imbalances. When these imbalances occur, they create high-probability trading opportunities for those who can identify them early. The Supply Demand Edge indicator transforms this concept into a systematic approach by detecting divergences between price action and underlying market breadth data.

This sophisticated indicator analyzes two critical market breadth components – the NYSE TICK and Advance/Decline spread – to identify when institutional buying or selling pressure diverges from what price action suggests. These divergences often precede significant reversals, giving traders an edge in timing their entries and exits.

Understanding Market Breadth and Supply/Demand Dynamics

The stock market operates as a massive marketplace where buyers and sellers continuously interact. Our primary objective as traders is determining whether we’re in a buyer’s market or seller’s market, then positioning ourselves accordingly. However, surface-level price movements often mask the underlying supply and demand dynamics that truly drive market direction.

Market breadth analysis provides the solution by examining the internal mechanics of market movement. Unlike price-based indicators that only show the result of buying and selling activity, breadth indicators reveal the actual process of accumulation and distribution as it occurs.

The Supply Demand Edge indicator focuses on two specific breadth measures that provide complementary insights into market dynamics. The NYSE TICK measures immediate buying and selling pressure by tracking stocks trading on upticks versus downticks. The Advance/Decline spread reveals the overall participation level by counting advancing stocks versus declining stocks.

When these breadth measures diverge from price action, they often signal that the current trend is losing momentum and a reversal may be imminent. This divergence-based approach provides early warning signals that price-only analysis typically misses.

The Power of NYSE TICK Analysis

The NYSE TICK represents one of the most powerful real-time sentiment indicators available to traders. It measures the number of NYSE-listed stocks whose last trade occurred on an uptick minus those whose last trade occurred on a downtick. This calculation provides immediate insight into whether buying or selling pressure dominates the market at any given moment.

In normal market conditions, we expect TICK readings to align with price movement. During strong uptrends, TICK values should remain predominantly positive, reflecting sustained buying pressure. Conversely, during downtrends, negative TICK readings should persist as selling pressure overwhelms buying interest.

However, divergences create the most profitable opportunities. When prices make new highs but TICK readings fail to confirm by reaching new highs, it suggests that buying pressure is waning despite the price advance. Similarly, when prices make new lows but TICK readings improve (become less negative), it indicates that selling pressure is diminishing even as prices continue to decline.

The Supply Demand Edge indicator automates this divergence detection process by comparing current TICK levels to the day’s high and low TICK readings whenever price reaches new daily highs or lows. This systematic approach eliminates the need for manual chart monitoring while ensuring that no significant divergences are missed.

Advance/Decline Spread Divergence Analysis

While TICK data provides insight into immediate buying and selling pressure, the Advance/Decline spread offers a broader perspective on market participation. This measure compares the number of advancing stocks to declining stocks, revealing whether market movements reflect broad-based participation or are driven by a limited number of issues.

Healthy trends typically display strong Advance/Decline participation. During genuine bull markets, we expect to see more stocks advancing than declining, supporting the upward price movement. Conversely, legitimate bear markets should show more declining stocks than advancing ones, confirming the downward price trend.

Divergences in Advance/Decline data often precede major trend changes. When major indices make new highs but fewer stocks participate in the advance (advance/decline spread weakens), it suggests that the rally lacks broad-based support and may be vulnerable to reversal. Similarly, when indices make new lows but the decline/advance spread improves, it indicates that the selling pressure is becoming more selective rather than broad-based.

The Supply Demand Edge indicator tracks these divergences by monitoring the Advance/Decline spread’s daily highs and lows relative to price action. When price reaches new daily extremes but the A/D spread fails to confirm, the indicator generates signals that alert traders to potential reversal opportunities.

Building the High/Low Tracking Framework

The foundation of the Supply Demand Edge indicator lies in its ability to accurately track daily highs and lows for both price and breadth measures. This tracking must account for regular trading session boundaries to ensure that pre-market and after-hours activity doesn’t interfere with the analysis.

The indicator uses a regular session definition that spans from 9:30 AM to 4:00 PM EST, the standard NYSE trading hours. This boundary ensures that breadth calculations remain meaningful since NYSE TICK and Advance/Decline data are only available during regular market hours.

def regularSession = secondsFromTime(0930) > 0 && secondsTillTime(1600) > 0;

Within this session framework, the indicator maintains running calculations of daily highs and lows for both price and breadth measures. For price data, it tracks the highest high and lowest low of the current trading session. For breadth data, it separately tracks the highest and lowest readings for both TICK and Advance/Decline spread.

This multi-layered tracking system enables the indicator to make accurate comparisons between current readings and daily extremes, which forms the basis for divergence detection. The session-based approach ensures that each trading day starts with a clean slate, preventing previous day’s data from influencing current day’s analysis.

Divergence Detection Logic and Signal Generation

The core functionality of the Supply Demand Edge indicator revolves around its divergence detection algorithms. These algorithms continuously compare current breadth readings to daily extremes whenever price reaches new highs or lows, identifying moments when market internals fail to confirm price action.

For bearish divergence detection (short signals), the indicator looks for situations where:

  • Price reaches a new daily high (current high equals high of day)
  • TICK or A/D spread fails to reach a new daily high (current reading < daily high)

This combination suggests that while price has moved to new highs, the underlying buying pressure or market participation has weakened compared to earlier in the session. Such divergences often precede short-term price reversals as the lack of breadth confirmation indicates that the advance lacks sustainability.

For bullish divergence detection (long signals), the logic reverses:

  • Price reaches a new daily low (current low equals low of day)
  • TICK or A/D spread shows improvement from daily lows (current reading > daily low)

This pattern indicates that while price has declined to new lows, the underlying selling pressure or market participation has diminished. The improvement in breadth readings despite new price lows often signals that the decline is losing momentum and a bounce may be imminent.

The indicator generates visual signals through arrow plots that appear directly on the price chart. Up arrows indicate bullish divergences (potential long opportunities), while down arrows mark bearish divergences (potential short opportunities). Different colors distinguish between TICK-based signals and A/D-based signals, allowing traders to understand the source of each divergence.

Customization and Display Options

Professional trading requires flexibility in indicator presentation, and the Supply Demand Edge indicator provides several customization options to accommodate different trading styles and preferences. Two primary input parameters control signal display:

showTicks Parameter: This boolean input allows traders to enable or disable TICK-based divergence signals. Some traders prefer to focus exclusively on Advance/Decline divergences, particularly when trading stocks that may not correlate strongly with broad NYSE TICK movements.

showAD Parameter: This boolean input controls the display of Advance/Decline spread divergence signals. Traders focusing on short-term price movements might prefer TICK signals over A/D signals due to their more immediate nature.

The visual presentation uses distinct colors for each signal type:

  • TICK signals appear in red (short) and light green (long) with heavier line weights
  • A/D signals appear in white with lighter line weights

This color coding system allows traders to quickly identify the source of each signal while maintaining chart readability. The different line weights help prioritize signal importance based on the trader’s preferred analysis methodology.

Integration with Volatility and Overbought/Oversold Analysis

The Supply Demand Edge indicator works exceptionally well when combined with volatility-based tools and overbought/oversold indicators. This complementary approach helps traders identify not just when divergences occur, but also when market conditions are most favorable for divergence-based reversals.

Volatility expansion often accompanies significant supply/demand imbalances, making periods of high volatility particularly conducive to divergence-based trading. When the Supply Demand Edge indicator generates signals during volatility expansion phases, the probability of meaningful reversals typically increases significantly.

Overbought and oversold conditions provide additional context for interpreting divergence signals. Divergences that occur when prices are extended from key moving averages or when oscillators show extreme readings often produce more reliable reversal signals than those occurring in neutral market conditions.

It’s important to note that the Supply Demand Edge indicator is completely separate from the Edge Signals indicator. While both tools can complement volatility analysis, the Edge Signals indicator serves as an advanced overbought/oversold confirmation tool (similar to RSI but more sophisticated) and is exclusively available to Volatility Box members. The Supply Demand Edge indicator, in contrast, focuses specifically on supply/demand imbalance detection and is available to all traders.

Practical Trading Applications and Strategy Development

Scalping and Day Trading: The Supply Demand Edge indicator excels in short-term trading applications where quick identification of reversal points provides significant advantages. Day traders can use the signals to time entries at key support and resistance levels, particularly when divergences align with technical levels.

Swing Trading Enhancement: For swing traders, the indicator helps identify optimal entry points within larger trends. Bullish divergences during pullbacks in uptrends often mark excellent buying opportunities, while bearish divergences during rallies in downtrends signal potential shorting opportunities.

Risk Management: The indicator also serves as a risk management tool by alerting traders when their positions may be vulnerable to reversal. Traders holding long positions can watch for bearish divergences as potential exit signals, while those holding short positions can monitor bullish divergences.

Multi-Timeframe Analysis: Advanced traders can apply the indicator across multiple timeframes to build comprehensive market pictures. Divergences on longer timeframes (15-minute, 30-minute) often provide more significant reversal signals than those on shorter timeframes.

Timeframe Optimization and Performance Considerations

The Supply Demand Edge indicator adapts well to different timeframes, but certain considerations optimize its performance. On very short timeframes (1-minute, 2-minute), the indicator may generate numerous signals, some of which represent normal market noise rather than meaningful divergences. Traders using these timeframes should consider combining signals with additional confirmation filters.

Medium timeframes (5-minute to 15-minute) often provide the best balance between signal frequency and reliability. These timeframes allow enough time for meaningful divergences to develop while maintaining sufficient signal frequency for active trading.

Longer timeframes (30-minute and above) typically generate fewer but higher-quality signals. These timeframes work well for swing trading applications where traders seek larger moves and can tolerate lower signal frequency in exchange for higher reliability.

Market Condition Adaptability

Different market conditions require different approaches to divergence analysis. During trending markets, traders should focus primarily on divergences that align with counter-trend opportunities, as these often provide the highest-probability reversal setups. In trending markets, divergences against the primary trend typically produce short-term reversals rather than trend changes.

Range-bound markets often provide ideal conditions for divergence-based trading, as the lack of strong directional bias makes reversals more likely when divergences occur. In these conditions, both bullish and bearish divergences tend to produce meaningful moves as the market oscillates between support and resistance levels.

High-volatility periods, such as those following major news events or during earnings seasons, can produce more pronounced divergences but also carry higher risk. Traders should adjust position sizes and risk parameters during these periods while remaining alert to the increased profit potential that volatility expansion provides.

Advanced Signal Interpretation Techniques

Experienced traders can enhance the indicator’s effectiveness through advanced signal interpretation techniques. Multiple consecutive signals in the same direction often indicate strong underlying imbalances and may warrant larger position sizes or extended holding periods.

The strength of divergences varies based on the magnitude of the breadth reading differences. Large divergences (where current readings differ significantly from daily extremes) typically produce more reliable signals than marginal divergences where the differences are minimal.

Signal clustering around key technical levels (support, resistance, moving averages) often increases reliability significantly. When divergences align with established technical analysis principles, the probability of successful trades typically improves substantially.

Risk Management and Position Sizing

Effective use of the Supply Demand Edge indicator requires proper risk management and position sizing protocols. While the indicator identifies high-probability setups, not every signal will produce profitable trades, making risk control essential for long-term success.

Position sizing should account for the indicator’s historical performance characteristics and current market volatility. During periods of low volatility, smaller position sizes may be appropriate as potential moves may be limited. Conversely, during high-volatility periods, reduced position sizes help manage the increased risk while still capitalizing on the enhanced profit potential.

Stop-loss placement should consider both the technical setup and the typical performance characteristics of divergence signals. Since divergences often precede reversals rather than immediate moves, allowing adequate room for normal price fluctuation while maintaining acceptable risk levels requires careful balance.

Conclusion: Leveraging Market Imbalances for Trading Success

The Supply Demand Edge indicator provides traders with a systematic approach to identifying market imbalances that often precede profitable reversal opportunities. By automating the detection of divergences between price action and underlying market breadth, the indicator helps traders spot opportunities that manual analysis might miss while reducing the time and effort required for market monitoring.

Success with the indicator requires understanding its strengths and limitations while integrating it effectively with broader trading strategies. When used in conjunction with volatility analysis, technical levels, and proper risk management, the Supply Demand Edge indicator can significantly enhance trading performance across various market conditions and timeframes.

Remember that this indicator serves a different purpose than the Edge Signals indicator available to Volatility Box members. While both tools can enhance trading performance, the Supply Demand Edge focuses specifically on supply/demand imbalance detection, making it an excellent complement to other technical analysis tools and trading systems.

Supply Demand Imbalance Indicator.ts
#TOS Indicators

#Home of the Volatility Box

#More info regarding this indicator here: tosindicators.com/supply-demand-edge

#Code initially written in 2019

#Full Youtube Tutorial here: https://youtu.be/RNtsjfHYWfs


// ... 52 more lines ...

Unlock This Code

Create a free account to access the full source code and download files.

Create Free Account Login
The Supply Demand Edge indicator detects supply and demand imbalances by monitoring divergences between price action and market breadth data (NYSE TICK and Advance/Decline spread). When price reaches new daily highs but TICK or A/D data fails to confirm, it signals potential bearish divergence. When price makes new lows but breadth data improves, it signals potential bullish divergence.
The Supply Demand Edge indicator focuses on detecting supply/demand imbalances using NYSE TICK and Advance/Decline divergences. The Edge Signals indicator is a completely separate tool exclusively for Volatility Box members that serves as an advanced overbought/oversold confirmation system (like RSI on steroids). Both complement volatility analysis but serve different purposes.
The indicator uses regular session hours (9:30 AM - 4:00 PM EST) because NYSE TICK and Advance/Decline data are only available during regular market hours. The code includes extended hours compatibility, automatically handling the session boundaries to ensure accurate high/low tracking regardless of your chart's extended hours settings.
The indicator uses different colors to distinguish signal sources: TICK-based signals appear in red (bearish) and light green (bullish) with heavier line weights, while Advance/Decline signals appear in white with lighter line weights. This color coding helps traders quickly identify whether divergences are based on immediate buying/selling pressure (TICK) or broader market participation (A/D).
Yes, the indicator includes two input parameters: 'showTicks' and 'showAD' (both default to 'yes'). You can disable TICK signals by setting showTicks to 'no' or disable Advance/Decline signals by setting showAD to 'no'. This allows you to focus on your preferred divergence type based on your trading style and preferences.
Medium timeframes (5-15 minutes) often provide the best balance between signal frequency and reliability. Very short timeframes (1-2 minutes) may generate too much noise, while longer timeframes (30+ minutes) produce fewer but higher-quality signals. Choose based on your trading style: scalpers use shorter timeframes, swing traders prefer longer ones.
The indicator works excellently with volatility-based tools and overbought/oversold indicators. Use it to identify reversal opportunities in volatility expansion zones or when prices are extended from moving averages. Combine with support/resistance levels, and consider using alongside indicators like the Volatility Box models for comprehensive market timing.
No, not all divergence signals lead to immediate or significant reversals. The indicator identifies high-probability opportunities, but success rates vary based on market conditions, signal strength, and confluence with other technical factors. Use proper risk management, position sizing, and combine with additional confirmation tools for best results.

Here are some resources that you may find useful:

  • Edge Signals Indicator (Free for Volatility Box members)
  • How to import an indicator into ThinkOrSwim (video tutorial)
Featured Tools:
Stock Volatility Box

Stock Volatility Box

Spot reversal zones across 600 stocks & ETFs.

  • Hourly & daily models
  • Powerful Live Scanner
  • Built for day traders
Futures Volatility Box

Futures Volatility Box

Pinpoint reversal zones in 10 major futures markets.

  • 5 models (incl. Scalper)
  • ThinkOrSwim & TradingView
  • SPX traders
ORB Setups

ORB Setups

Find the best Opening Range Breakout setups.

  • Powerful real-time scanner
  • Instant backtests
  • 2+ years data

Get Free Access

Create a free account for downloads and new tutorial alerts.

Create Free Account

More Tutorials Like This

Wilder's Momentum Concept

Wilder's Momentum Concept

Beginner • 23 minutes
Dynamic RSI

Dynamic RSI

Intermediate • 48 mins
Cumulative Advance Decline Trading System

Cumulative Advance Decline Trading System

Beginner-Friendly • 11 mins

Ready to Trade With an Edge?

Join 40,000+ traders using institutional-grade tools for ThinkOrSwim.

Get the Bundle
TOS Indicators

Premium thinkorswim indicators, scans, and trading tools to help you trade smarter.

ThinkOrSwim Tools

  • Indicators
  • Scans
  • Backtesters
  • Dashboards
  • thinkScript
  • Browse All

Courses

  • Squeeze Course
  • Earnings Course
  • V-Shaped Reversals
  • Fibonacci Trading

Products

  • Futures Volatility Box
  • Stock Volatility Box
  • ORB Setups
  • Shop All

Guides

  • TTM Squeeze
  • Automated Trading
  • Volatility Trading
  • Opening Range Breakouts
  • Trade Reports
  • Contact Us

© 2026 TOS Indicators. All rights reserved.

Privacy Policy Terms of Service Disclaimer

The information contained on this website is solely for educational purposes, and does not constitute investment advice. The risk of trading in securities markets can be substantial. You must review and agree to our Terms of Service prior to using this site.

U.S. Government Required Disclaimer - Commodity Futures Trading Commission. Futures and options trading has large potential rewards, but also large potential risk. You must be aware of the risks and be willing to accept them in order to invest in the futures and options markets. Don't trade with money you can't afford to lose. This website is neither a solicitation nor an offer to Buy/Sell futures or options. No representation is being made that any account will or is likely to achieve profits or losses similar to those discussed on this website. The past performance of any trading system or methodology is not necessarily indicative of future results.

Individual results may vary, and testimonials are not claimed to represent typical results. All testimonials are by real people, and may not reflect the typical purchaser's experience, and are not intended to represent or guarantee that anyone will achieve the same or similar results.

TOS Indicator's Traders and employees will NEVER manage or offer to manage a customer or individual's options, stocks, currencies, futures, or any financial markets or securities account. If someone claiming to represent or be associated with TOS Indicator solicits you for money or offers to manage your trading account, do not provide any personal information and contact us immediately.

CFTC RULE 4.41 - HYPOTHETICAL OR SIMULATED PERFORMANCE RESULTS HAVE CERTAIN LIMITATIONS. UNLIKE AN ACTUAL PERFORMANCE RECORD, SIMULATED RESULTS DO NOT REPRESENT ACTUAL TRADING. ALSO, SINCE THE TRADES HAVE NOT BEEN EXECUTED, THE RESULTS MAY HAVE UNDER-OR-OVER COMPENSATED FOR THE IMPACT, IF ANY, OF CERTAIN MARKET FACTORS, SUCH AS LACK OF LIQUIDITY, SIMULATED TRADING PROGRAMS IN GENERAL ARE ALSO SUBJECT TO THE FACT THAT THEY ARE DESIGNED WITH THE BENEFIT OF HINDSIGHT. NO REPRESENTATION IS BEING MADE THAT ANY ACCOUNT WILL OR IS LIKELY TO ACHIEVE PROFIT OR LOSSES SIMILAR TO THOSE SHOWN.