Supply Demand Edge

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

youtube-video-thumbnail

Introduction

Welcome to the fourth episode of “How to Thinkscript”. We are TOSIndicators.com, home of the Volatility Box, the most robust ThinkOrSwim indicator based on statistical models built for large institutions and hedge funds.

In today’s video, we’re going to talk about how to spot supply/demand imbalances in the marketplace, and use that to find divergences that we can use in our trading.

 

This is primarily useful in day-trading anything that has a heavy weight in the indices (think the broader markets itself through SPY, QQQ, etc. or bigger names like MSFT or AAPL.

To find this supply demand imbalance, we use two key market internal tools: the Advance-Decline Spread and the NYSE Tick.

If you’d like to skip the tutorial and start playing with the indicator right away, it’s available to download for free below.

Volatility Box Invite

We are TOS Indicators.com, home of the Volatility Box.

The Volatility Box is our secret tool, to help us consistently profit from the market place. We’re a small team, and we spend hours every day, after the market close, doing nothing but studying thousands of data points to keep improving and perfecting the Volatility Box price ranges.

We have two different Volatility Boxes - a Futures Volatility Box and a Stock Volatility Box.

Futures Volatility Box - Trade Major Markets With an Edge

Designed For: Futures, Micro-Futures and Index Market Traders
Supported Models: Hourly Volatility Box models
Supported Markets: 10 Major Futures Markets

The Futures Volatility Box comes with:

  • 5 Volatility Models for each market
  • Support for 10 Futures Markets (/ES, /NQ, /YM, /RTY, /CL, /GC, /SI, /ZB, /HG, /NG)
  • Video Setup Guide
  • Trade Plan
  • Access to all members-only resources, including Squeeze Course

Learn More About the Futures Volatility Box

Trade futures and micro futures with a consistent volatility edge

Stock Volatility Box - Powerful Web Based Volatility Platform

Designed For: Stock and Options Traders
Supported Models: Hourly and Daily Volatility Box models
Supported Markets: 10,000+ Stocks and ETFs (new markets added frequently)

A Stock Volatility Box membership includes access to: 

  • Live Scanner - A powerful scanner we've built from scratch, to scan 10,000 symbols every 2 seconds for new volatility breaches
  • Dashboard - A quick and easy way to view daily volatility model levels online
  • Short Interest Scanner - Short interest, Squeeze, and EMA data to find short squeezes
  • Squeeze Course - All of our proprietary squeeze tools, including robust backtesters
  • All Members Only Indicators - We don't nickel and dime you. Everything really is included.
  • And much more!

Learn More About the Stock Volatility Box

Trade stocks and options with a consistent volatility edge

Understanding the A/D Line and NYSE TICK

The Advance/Decline (A/D) Line

The A/D line is a breadth indicator that measures the number of advancing stocks against the number of declining stocks on a given exchange.

How to read the A/D line:

  • A rising A/D line indicates overall market strength
  • A declining A/D line suggests market weakness

The NYSE TICK

The NYSE TICK measures the difference between the number of stocks trading on an uptick and the number trading on a downtick on the NYSE.

How to read the NYSE Tick ($TICK):

  • A positive TICK value indicates more buying pressure
  • A negative value suggests more selling pressure.

 

Coding the Supply Demand Edge Indicator

Step 1: Define the High and Low of the Day

The first step is to define the high and low of the day for the price, A/D line, and NYSE TICK. This will serve as the basis for identifying divergences.

def regularSession = secondsFromTime(0930) > 0 && secondsTillTime(1600) > 0;
def hod = if regularSession then if (high > hod[1]) then high else hod[1] else high;
def lod = if regularSession then if (low < lod[1]) then low else lod[1] else low;

 

Step 2: Define High/Low for A/D Line and TICK

Next, we'll define the current high and low values for the A/D line and NYSE TICK. These will be used to compare against the previous high and low values to identify divergences.

def highAD = if regularSession then if (high(symbol="$ADSPD") > highAD[1]) then high(symbol="$ADSPD") else highAD[1] else high(symbol="$ADSPD");
def lowAD = if regularSession then if (low(symbol="$ADSPD") < lowAD[1]) then low(symbol="$ADSPD") else lowAD[1] else low(symbol="$ADSPD"); def highTick = if regularSession then if (high(symbol="$TICK") > highTick[1]) then high(symbol="$TICK") else highTick[1] else high(symbol="$TICK");
def lowTick = if regularSession then if (low(symbol="$TICK") < lowTick[1]) then low(symbol="$TICK") else lowTick[1] else low(symbol="$TICK");

 

Step 3: Define Current High/Low for A/D Line and TICK

We track what the current high and low value is for the A/D line and NYSE $TICK. The reason we track high and low values is to be able to compare if we made a "higher high" in one, but not in the other. This is the beginnings of a divergence.

def currentHighAD = high(symbol="$ADSPD");
def currentLowAD = low(symbol="$ADSPD"); 
def currentHighTick = high(symbol="$TICK");
def currentLowTick = low(symbol="$TICK");

 

Step 4: Plot the Divergence Signals

Now, we'll plot the divergence signals using the information we've gathered. We'll create four separate signals: AD short, AD long, TICK short, and TICK long.

plot ADShortSignal = showAD && high == hod && currentHighAD < highAD; plot ADLongSignal = showAD && low == lod && currentLowAD > lowAD;
plot TickShortSignal = showTicks && high == hod && currentHighTick < highTick; plot TickLongSignal = showTicks && low == lod && currentLowTick > lowTick;

 

Step 5: Set Painting Strategy and Customize Appearance

To make the divergence signals more visually appealing and easy to identify, we'll set a painting strategy for each signal. We'll use boolean arrow plots to represent the signals. You can further customize the appearance of the divergence signals by adjusting the line weight and color. For example, you could make the A/D line signals green and the TICK signals cyan.

ADShortSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);


ADShortSignal.SetDefaultColor(Color.WHITE);
ADShortSignal.SetLineWeight(1);

ADLongSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
ADLongSignal.SetDefaultColor(Color.WHITE);
ADLongSignal.SetLineWeight(1);

TickShortSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
TickShortSignal.SetDefaultColor(Color.RED);
TickShortSignal.SetLineWeight(2);

TickLongSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
TickLongSignal.SetDefaultColor(Color.LIGHT_GREEN);
TickLongSignal.SetLineWeight(2);

 

Step 6: Add User Parameters

To provide more flexibility, you can add user parameters that allow traders to choose whether they want to display the A/D line signals, TICK signals, or both.

input showTicks = yes;
input showAD = yes;

Then, wrap the plotting of each signal with a conditional statement that checks the corresponding user parameter.

Interpreting the Supply Demand Edge Indicator

With the Supply Demand Edge indicator coded and applied to your charts, you'll be able to identify potential trading opportunities based on divergences between price action and the A/D line and NYSE TICK.

From experience, I've found this indicator works best when paired together with other indicators. We like to pair it with the Volatility Box models, in order to leverage both a volatility edge, along with a supply demand edge.

Here's how you can interpret the signals:

  • A/D Line Divergence: If the price is making new highs (or lows) but the A/D line is not confirming the move, it could signal a potential reversal.
  • TICK Divergence: If the price is making new highs (or lows) but the TICK is not confirming the move, it could also signal a potential reversal.

It's important to note that not all divergences will result in a reversal, and some may be false signals. Additionally, the Supply Demand Edge indicator will often plot multiple arrows, before the reversal actually kicks into full gear.

Frequently Asked Questions

No - the Edge Signals indicator is our custom overbought/oversold indicator. These are the green and red arrows that you will see in out YouTube videos, which helps you pinpoint when an underlying is about to reverse. The Edge Signals indicator is a premium indicator, included for free with all Volatility Box memberships.  

The Supply Demand Edge indicator can be used on various timeframes, from intraday to daily time frame charts. However, it's generally more effective on higher timeframes (e.g., 15-minute, hourly, or daily) as it can help filter out some of the noise present on lower timeframes. Here is a video that compares 4 different time frames, to illustrate the "noise" difference.

The Supply Demand Edge indicator can be used on a wide range of markets, including stocks, futures, forex, and more. However, most use it on an index chart (SPY, SPX, QQQ, DIA, and IWM), to help with making the most out of the market internals (A/D line and TICK data).

The strength of a Supply Demand Edge divergence signal can be evaluated by considering factors such as the magnitude of the divergence, the duration of the divergence, and the overall market context.

Generally, larger and longer-lasting divergences tend to be stronger signals. Additionally, divergences that occur in the direction of the overall trend may be more reliable than those against the trend.

While the Supply Demand Edge indicator can provide valuable insights into supply and demand imbalances, it's not recommended to use it as a standalone trading strategy.

Like any other indicator, it should be used in conjunction with other technical analysis tools, risk management strategies, and proper trade management techniques.

We pair the Supply Demand Edge indicator with the Volatility Box models, to take advantage of reversal setups.

Table of Contents
    Add a header to begin generating the table of contents