Black Friday Sale: Get 30% Off →
Premium Indicator

Supply and Demand Indicator for TradingView

Supply and Demand indicator for TradingView showing session open boxes, current 4 Hour open lines, higher timeframe levels and two VWAPs

Price keeps coming back to the same places: last week’s high, today’s open, the candle where volume blew out, the spot where London opened. The Supply and Demand indicator draws those levels on your TradingView chart across seven timeframes, so they are already there when price gets back to them.

Below you will see how each level type works, how to set it up for scalping or swing trading, and exactly which lines lock in and which ones still move. The code comes from Lane Dotson, an active futures trader since 2013 who builds every Trend Friend indicator himself.

Built by Lane Dotson · Indicator published · Indicator updated · Page updated · View on TradingView →

The View on TradingView link is an affiliate link. If you buy a TradingView plan after clicking it, we may earn a commission.

Part of the Premium Indicator Suite - 10 indicators for $39.99/mo. View suite → Pricing →

What It Does

Core Features

Four level types do the main work here: higher timeframe OHLC (open, high, low and close) levels, volume spike levels, session levels and two VWAPs (volume-weighted average prices). Each one comes at support and resistance from a different angle. On top of them you get Current Open lines, two kinds of 50% midline, price-tracking labels and a trend output you can send to other indicators.

Volume Spike Levels

A candle that prints far more volume than normal usually means large orders were busy at those prices. Those prices often turn into support and resistance well after that candle is done. The indicator watches the 1 Hour, 4 Hour, Daily, Weekly and Monthly candles for those spikes and draws levels from the ones it finds. Each finished candle is measured against an adaptive average of recent volume that blends several lookback windows and filters out outlier readings. That way a single giant print or a quiet holiday session can’t skew the baseline. The average adjusts itself to each market and to changing volume over time, so there is nothing to tune by hand.

Every spike candle can give you up to six lines: its high, low, open, close and both 50% midlines. Only the close line is on by default, because that is the price where all that heavy trading ended up. How long a spike line stays up depends on its timeframe. 1 Hour spikes stay for 1 day, 4 Hour spikes for 3 days, Daily spikes for 1 week, Weekly spikes for 1 month and Monthly spikes for 1 quarter. Weekly and Monthly spike lines are drawn thicker so the bigger levels stand out.

Supply and Demand indicator on a 1 minute ES futures chart showing four 4 Hour volume spike close lines
4 Hour volume spike close levels on a 1 minute ES (S&P 500 E-mini) chart, turned on for this example since they are off by default. Each line marks where a 4 Hour candle with far more volume than normal closed.

Current Open Lines

A dashed line marks the open of the candle that is still forming on each timeframe, from the 1 Hour up to the Yearly. Price above a timeframe’s current open is a bullish bias for that timeframe, and price below it is bearish. The open is set the moment the candle starts, so the line never moves, and a fresh one shows up when the next candle opens. The 4 Hour, Daily, Weekly, Monthly, Quarterly and Yearly current opens are on by default.

Higher Timeframe OHLC Levels

For each of seven timeframes (1 Hour, 4 Hour, Daily, Weekly, Monthly, Quarterly and Yearly) the indicator draws the high, low, open and close of the last finished candle. So many traders watch these levels that price reacts to them over and over. Every line type has its own toggle on every timeframe, so you only see the levels you actually trade.

Turn on Candle Body Color Fill and the space between the previous candle’s open and close gets shaded like a see-through candle body. It works even with the open and close lines turned off, and you can change the shade and how see-through it is. The Line Length Multiple decides how many sessions each candle’s lines stay up for, with 2 as the default. If a weekend or holiday leaves a gap on the chart, the newest lines get stretched over it, so the number of sessions you picked still shows up in full.

Daily and higher levels can also extend all the way to the right edge of the chart, and the Yearly levels do by default. Weekly and higher levels have a Display Anchor that starts their lines on a lower timeframe, like each new day. That lets them load properly on intraday charts even with TradingView’s limit on how much history loads. Remember that the 1 Hour, 4 Hour and Daily levels need an intraday chart, while Weekly and higher levels show up on any chart timeframe.

Supply and Demand indicator on a 1 minute ES futures chart showing the previous day high and low, 50% midlines and the current day open
Daily levels on a 1 minute ES chart: the previous day's high and low in yellow, the 50% midlines in aqua, and the current day's open as a dashed white line.

50% Midlines

Every timeframe gives you two kinds of midline, and each one has its own toggle:

  • CB 50% Midline – the middle of the previous candle’s body, from open to close, with the wicks left out
  • HL 50% Midline – the middle of the previous candle’s full range, from high to low, wicks included

Think of the midlines as trend guides. Price sitting above a timeframe’s midline keeps that timeframe leaning bullish until price holds below it, and it works the same way in reverse for bearish. Use the 1 Hour and 4 Hour midlines for short term direction and the Daily and up for the bigger picture.

Price also tends to travel from one higher timeframe midline to the next, so make sure to keep an eye on them as targets. Both midlines are on by default for the Daily and higher timeframes.

Trading Sessions

Traders around the world get active at the same times each day, so the levels left by the Tokyo, London and New York sessions get respected over and over. The indicator times each session by that market’s own clock. Tokyo runs 9:00 AM to 3:30 PM Tokyo time, London runs 8:00 AM to 4:30 PM London time and New York runs 9:30 AM to 4:00 PM New York time. That way daylight saving changes never knock a session off.

Each session gives you three things to turn on. Session Open Boxes cover the body of the session’s first 1 minute candle, and a line marks that candle’s high and another its low. Session Close Boxes do the same job for the session’s last 1 minute candle and get a heavier outline. Session High & Low Lines show the full range of the session and appear as soon as it ends. Only the open boxes are on by default.

You pick how many past sessions stay on the chart, and each level can carry a label like NY Open, London Close or Tokyo High, so you always know which market left it behind. Sessions only show on intraday charts and hide on the Daily chart and above.

Supply and Demand indicator on a 1 minute ES futures chart showing Tokyo, London and New York session open boxes
Tokyo, London and New York session open boxes on a 1 minute ES chart, each with lines at the high and low of the session's first 1 minute candle.

VWAP & Previous Close Levels

VWAP is the average price paid over a set period, weighted by how much traded at each price. It is one of the most watched lines in day trading, so price reacts around it a lot, and the first hour after the open is when you see it most.

You get two VWAPs that run on their own. Each one gets its own setup: its reset timeframe (4H, 12H, 1D, 1W, 1M, 3M or 12M), how thick and what color the line is, and whether it draws previous close levels. By default VWAP #1 resets every day and VWAP #2 resets every week, so you can follow short term and bigger picture positioning side by side.

When a period finishes, its final VWAP value becomes a previous close level, drawn as a flat line across the next period. Price often reacts at these levels, so make sure to watch how it behaves around them. VWAPs only show on intraday charts.

Supply and Demand indicator on a 1 minute ES futures chart showing the daily and weekly VWAPs and the previous day VWAP close levels
The daily VWAP (thinner line) and weekly VWAP (thicker line) on a 1 minute ES chart. The flat lines are the previous day's VWAP closes.

Price-Tracking Labels & Warning Table

Turn labels on and each line gets a name tag that sits at its price on the right side of the chart. A label like Prev 1D High, 1W Vol Close or VWAP 1D tells you the timeframe and the level type in one look. If the Line Length Multiple has a few sessions of lines up together, the older ones carry a count, like Prev[1] 1D High for one session back. Once a line runs out, its label stays put where it ended. The 1 Hour OHLC levels have no labels on purpose, because up to 24 sets of hourly tags would bury the chart.

A small warning table sits at the top center of the chart. It speaks up when a Display Anchor has to come down before higher timeframe levels can load, or when your settings would draw more than TradingView’s 500 line limit. Each warning goes away by itself once you fix the problem, and you can switch the table off.

External Trend Direction Output

The indicator sends out a trend value, listed as Trend Direction To Send To External Indicators, where 1 means bullish, -1 means bearish and 0 means neutral. Signal indicators with an outside filter input, like the 1 Minute Scalping Indicator or Swing Trade & Scalp Signals, can use it to filter signals. Their entries then only show up in the direction of your trend.

You build the trend from up to four filters: VWAP #1, VWAP #2 and two OHLC filters that each use the level type and timeframe you choose. The value only turns 1 or -1 when every filter you turned on agrees, and anything less reads 0, so it stays neutral when your levels disagree. Out of the box, one filter is on: price compared to the current Daily open.

How to Trade With It

Trading Applications

Supply and demand trading means letting price come to you. You let price travel back to a spot where it turned hard before and trade the reaction right there, rather than jumping in after the move is already gone. The areas that matter most are where different level types stack close together, like a volume spike close sitting near a Daily midline and a VWAP level. That is why all four level types live in one indicator.

Supply and Demand indicator on a 1 minute ES chart showing session open boxes, 4 Hour open lines, higher timeframe levels and two VWAPs
Session open boxes, current 4 Hour open lines, previous higher timeframe levels and both VWAPs on one 1 minute ES chart. Look for the spots where several of them sit close together.

Scalping (1-5 Minute Charts)

The default settings are a good starting point for scalping the 1 to 5 minute charts. Turn on the 1 Hour levels, more 4 Hour lines and the session high and low lines when you want more nearby levels to trade between. When price tags a level, look at how it reacts: wicks getting rejected, price stuck at the line, or a reversal candle printing right on it. Take the reversal and aim for the next major level.

For timing, pair it with a signal indicator like the Buy Sell Indicator. If your signal indicator can read an outside filter, send it the trend output so signals only fire with the trend. Make sure to practice this on old sessions with Bar Replay before you trade it live.

Swing Trading

For swing trades, switch off the 1 Hour, 4 Hour and session levels. Keep the Daily and up OHLC levels, the midlines and the Weekly and Monthly volume spikes. Turning on Extend Lines Right for the Daily and higher timeframes helps here, because those lines then reach the right side of the chart rather than ending at the next candle. From there, swing the turns between major levels, and treat the thicker lines and the higher timeframe lines as the ones that count most.

Using 50% Midlines for Trend Direction

Read the midlines one timeframe at a time. Price above the 4 Hour midline is bullish for the 4 Hour, price below the Weekly midline is bearish for the Weekly, and so on. When the short term and longer term midlines agree, you have a much clearer read on direction.

The Current Open lines are a live check on that read. Holding over the Daily open leans bullish for the day and holding under it leans bearish, and you can read every timeframe’s open that way. The higher timeframe midlines also make natural targets, since price tends to travel from one to the next.

CONFIGURATION

Settings Overview

The settings are grouped by level type, with one group per timeframe. All the colors are parked in four groups at the end of the panel, so the toggles you use every day stay clean. Every setting has a tooltip that explains exactly what it does. Here is what each group holds and what is on out of the box.

Volume Spike Settings

  • Master toggle and Number Of Spike Lines Back (3 by default) for each timeframe
  • Toggles for High & Low, Open, Close, both midlines and labels
  • Daily, Weekly and Monthly spikes are on with the Close line, and 1 Hour and 4 Hour spikes are off

OHLC Level Settings

  • Master toggle, Number Of Lines Back and Line Length Multiple (2 by default) for each timeframe
  • Toggles for High & Low, Open & Close, Current Open, CB 50% Midline, HL 50% Midline, Candle Body Color Fill and labels
  • Extend Lines Right on Daily and higher, on for Yearly by default
  • Display Anchor on Weekly and higher, set to 1W by default
  • Hourly keeps 24 lines back with every line type off, and 4 Hour keeps 18 with only the Current Open on
  • Daily keeps 14 and Weekly keeps 4, both with the High & Low, Current Open and both midlines on
  • Monthly, Quarterly and Yearly keep 4 each with every line type on

Trading Session Settings

  • Session Open Boxes (on), Session Close Boxes (off) and Session High & Low Lines (off)
  • Number Of Session Lines & Boxes Back, 10 by default
  • Separate toggles for Tokyo, London and New York, all on by default
  • Session labels, on by default

VWAP Settings

  • For each VWAP: on/off, reset timeframe, line thickness, labels, previous close levels and how many close lines to keep
  • VWAP #1 starts with a 1D reset, 14 previous close lines and a thickness of 2
  • VWAP #2 starts with a 1W reset, 4 previous close lines and a thickness of 4

Labels, Warning Table & Colors

  • Label Offset In Bars sets how far right of the live bar the labels sit, 10 by default
  • Warning Table on/off, on by default
  • Colors live in four groups: OHLC Colors, Volume Spike Colors, Session Colors and VWAP Colors

External Trend Output Settings

  • VWAP #1 and VWAP #2 filter toggles, both off by default, and they work even when that VWAP’s line is hidden
  • Two OHLC filters, each with a level type (High and Low, Open and Close, Candle Body 50%, High Low 50% or Current Open) and a timeframe from 1 Hour to Yearly
  • OHLC Filter #2 is on with Current Open on the Daily, and OHLC Filter #1 is set to Current Open on the 4 Hour but turned off

Markets & Timeframes

Compatibility

The Supply and Demand indicator loads on any TradingView chart that has price data, so stocks, crypto, forex and futures all work, from 1 minute charts all the way up to the yearly. Out of the box it is set up for intraday trading, so make sure to dial in which levels are on. Scalpers usually want more lower timeframe and session levels, and swing traders usually turn those off and keep the higher timeframe ones.

The volume spike levels and the VWAPs need volume data to work, so symbols with no volume data, like some indices, will not show them. Every OHLC and session level still draws on those symbols. If Weekly or higher levels do not show up on an intraday chart, lower that timeframe’s Display Anchor, and a good place to start is 1D for Weekly and Monthly.

LEVEL CONFIRMATION

Repainting and Level Confirmation

Only a few things on this chart can move after they show up, and every one of them is a live value. The rest lock in.

  • Live values: the two live VWAP lines move with price on the open candle, the same as any VWAP. The trend output reads the live price too, so it can change while a candle is still forming, and it locks in when the candle closes.
  • Session open box: it uses the session’s first 1 minute candle, so on a live chart it can adjust during that first minute, then it locks in. The close boxes and the session high and low lines are built from candles that already closed.
  • Current Open lines: the open price is set the moment the candle starts, so the line never moves.
  • Higher timeframe levels: the OHLC lines, midlines, volume spike levels and VWAP previous close levels all come from a period that already finished. The indicator never uses data that was not there yet, and once one of these lines is drawn its price never changes.

IMPORTANT

Important Notes & Limitations

⚠ The 1 Hour, 4 Hour and Daily levels, both OHLC and volume spike, plus every session level and both VWAPs, need an intraday chart. Switch to the Daily chart or higher and you keep the Weekly, Monthly, Quarterly and Yearly OHLC levels along with the Weekly and Monthly volume spikes.
⚠ TradingView allows 500 lines per script. The defaults stay well below that, but every line type on every timeframe with big line counts can push past it. The warning table will tell you, and cutting the line counts on the timeframes you look at least clears it.
⚠ If Weekly or higher levels are missing, check the warning table. It tells you which Display Anchor to lower. On Daily and higher charts, set each anchor back to its own timeframe.
⚠ Symbols without volume data will not show volume spike levels or VWAPs. OHLC and session levels are not affected.
⚠ The live VWAP lines and the trend output follow price on the open candle. They lock in when the candle closes, and the higher timeframe levels do not move once they are on the chart.
No indicator is right every time, and past results never guarantee future results. Treat every signal as one piece of your decision and manage your risk on every trade.

Get Access

Get Supply and Demand
Plus 9 More Premium Indicators

Access the full Premium Indicator Suite on your TradingView charts. All 10 indicators, chart templates, and priority support.

$39.99/month · Cancel anytime · Try it: $24.99 for 2 weeks
✓ 10 Premium Indicators
✓ Chart Templates
✓ All Future Updates
✓ Priority Support

COMMON QUESTIONS

Frequently Asked Questions

The CB 50% midline is the middle of the previous candle's body, from open to close, and the HL 50% midline is the middle of its full range, wicks included. Price holding above a timeframe's midline keeps that timeframe leaning bullish, and holding below it leans bearish. The higher timeframe midlines also make good targets, since price tends to travel from one to the next.
Switch off the 1 Hour, 4 Hour and session levels, then keep the Daily and up OHLC levels, the midlines and the Weekly and Monthly spikes. Turn on Extend Lines Right for the Daily and higher timeframes so those lines reach the right side of the chart rather than ending at the next candle. Then trade the turns between major levels.
Yes. It loads on any TradingView chart that has price data, forex and crypto included, along with stocks and futures. Volume spike levels and VWAPs can't be built without volume data, so symbols that lack it only show the OHLC and session levels. On spot forex, volume comes from your chart's data provider rather than the whole market, so the volume-based levels follow that feed.
It is a value, listed as Trend Direction To Send To External Indicators, where 1 means bullish, -1 means bearish and 0 means neutral. You build it from up to four filters (two VWAPs and two OHLC levels), and it only reads 1 or -1 when every filter you turned on agrees. Trend Friend indicators with an outside filter input, like the 1 Minute Scalping Indicator or Swing Trade & Scalp Signals, can read it so their signals only fire with the trend.
The higher timeframe levels do not. Every OHLC line, midline and volume spike level comes from a finished candle, and its price never changes once it is on the chart. The live VWAP lines and the trend output follow price on the open candle and lock in when it closes, and the session open box settles after the session's first minute.
Use Supply and Demand as your map of levels and a signal indicator like the Buy Sell Indicator or Swing Trade & Scalp Signals for timing. If your signal indicator has an outside filter input, feed it this indicator's trend output so signals only show up with the trend. Signals that fire right at a level give you a clear spot to plan the trade around.

CHANGELOG

Release Notes

CURRENT VERSION
What You Get Today

When the Premium Suite moved into TradingView's Paid Space, the Supply and Demand indicator's description got a full rewrite to match the current version and the old release notes were removed to avoid confusion. This page reflects the current version of the indicator, so everything above matches what you get on your chart.

Show older updates
Major Rebuild — Dual VWAPs, Adaptive Volume & Trend Output

Complete rebuild with Pine Script v6 featuring two independent VWAPs, adaptive volume spike detection, two distinct midline types, current open lines, external trend direction output, price-tracking labels, and Display Anchors.

New Features
• Two independent VWAPs with separate reset timeframes (4H, 12H, 1D, 1W, 1M, 3M, or 12M), thickness, and previous-close lines
• External Indicator Filter Trend Output — configurable 1/-1/0 value using up to 4 filters (2 VWAPs, 2 OHLC levels) that only flips when all enabled filters agree
• Adaptive volume spike detection — rebuilt with adaptive weighting that calibrates to recent market conditions, replacing the static-lookback approach
• Two distinct midline types per timeframe: CB 50% (candle body, open-to-close) and HL 50% (high-to-low), each independently toggleable
• Current Open Lines — dashed line marking the open price of the in-progress candle on 1H, 4H, 1D, 1W, 1M, 3M, and 1Y
• Price-tracking labels on every level type — follow the right edge of the chart for instant identification
• Display Anchors for weekly, monthly, quarterly, and yearly levels — choose a lower timeframe trigger so HTF levels load correctly on intraday charts
• Extend Lines Right toggles for daily, weekly, monthly, quarterly, and yearly timeframes
• Full quarterly (3M) and yearly (12M) OHLC level support with the same line types, labels, and extend options
• Warning table — alerts for Display Anchor issues and line count exceeding TradingView's 500 cap
Improvements
• Local timezone sessions — Tokyo fires at 09:00 JST, London at 08:00 BST/GMT, New York at 09:30 ET regardless of DST
• Reorganized settings panel — colors consolidated into four groups at bottom (OHLC, Volume Spike, Session, VWAP); comprehensive tooltips on every input
• Updated to Pine Script v6 for better performance and newer language features
• All previous-period levels are confirmed repaint-free once drawn (live VWAPs update in real time)
Removed
• 3-day OHLC levels removed
• Session premarket boxes removed
• Old line identification and session identification tables replaced by price-tracking labels and warning table
Code Optimization

Optimized the code to resolve loading errors caused by TradingView reducing the allowed script size, while maintaining the same functionality.

What Changed
• Optimized code to fit within TradingView's reduced script size limits. Same functionality, no loading errors
50% Midlines & Display Overhaul

Major overhaul adding 50% midlines for each higher timeframe level, new line type toggles, and reorganized settings. Midlines act as dynamic trend direction support and resistance.

What Changed
• Added 50% midlines for each higher timeframe level which is the midpoint between high and low, acting as dynamic trend direction support and resistance
• New toggles to show only high & low lines, only open & close lines, only midlines, or all, giving full control over which level types are displayed
• Midlines given a single color setting (default white) for easy identification across all timeframes
• Changed how lines are displayed and updated default settings for better out-of-the-box experience
• Input menu rearranged for improved usability
Bug Fix & Default Settings

Minor bug fix and minor change to default settings.

What Changed
• Minor bug fix and default settings adjustment

EXPLORE THE SUITE

Related Indicators

Premium Suite

Multi-timeframe trend detection with master trend, ranging market filters, and trend strength scoring. Use its trend direction to see which supply and demand levels line up with the bigger trend.

Premium Suite

A moving average ribbon designed for scalping that shows trend direction and momentum at a glance. Combine with Supply and Demand to enter scalp trades when price reaches a key level and the ribbon confirms the reversal direction.

Premium Suite

Buy and sell signals built from price action alone. Use it with Supply and Demand to time your entries when price reaches a key level.