No Supply No Demand Indicator: One Regression Baseline

Written by Dominic Walsh · Published · Last updated

The No Supply No Demand Indicator draws a single smoothed baseline over the candles. Behind it sits an ordinary least-squares fit across the last 28 closes, refreshed on every bar. Price crossing that line drives the alert messages. Traders who want one quiet reference rather than a cluster of tools get exactly that.

This build ships as no-supply-no-demand-indicator-indicator-forexmt4systems.ex4 for MT4 and no-supply-no-demand-indicator-indicator-forexmt4systems.ex5 for MT5; the screenshots below come from EURUSD H1.

Platforms MT4 (.ex4) + MT5 (.ex5)
Chart window Main price chart
Plots 1: No
Alerts popup, push notification, email, sound
Inputs 7

What the No Supply No Demand Indicator draws on the chart

One line, one colour. The build carries a single buffer, labelled No in the data window and drawn in royal blue. It sits directly on the price chart rather than in a pane below.

That line follows a regression fit, not an average of closes. Each bar solves a least-squares problem across the last Period closes and plots the fitted value for that bar. The result hugs price more tightly than a moving average of the same length.

Nothing else prints. No rectangles, labels or panels appear, so the chart stays as clean as you set it up.

  • No: plot, royal blue
No Supply No Demand Indicator on EURUSD H1 with the royal blue regression baseline over price.
No Supply No Demand Indicator on EURUSD H1 with the royal blue regression baseline over price.

How the No Supply No Demand Indicator calculates its values

A least-squares fit on closes

Regression does the work. For each bar the code takes the last Period closes and numbers them from zero at the current candle backwards. It accumulates the sums needed for slope and intercept, then solves the pair of normal equations. The intercept lands at position zero, which is the current bar, and that value goes into the buffer.

Why the line lags less than an average

A moving average weights every close the same. Least squares instead fits a straight line and reports where that line sits now, which cancels part of the usual delay. The trade-off shows up as a livelier plot that turns sooner and overshoots more often.

How the alert reads price

The dispatcher looks at closed bars only. It compares the close two bars back and the close one bar back against the line at those same positions. A move from below the line to above it counts as a buy event. The mirror move counts as a sell event, and one message goes out per bar.

How to read the signals

Direction first. A line sloping up with candles above it says demand still leads. A line sloping down with candles below says supply has the upper hand. Flat sections mean neither side pushed the last Period bars anywhere.

Crosses give the timing. Price closing back above the line after a dip acts as the classic long cue, and the reverse for shorts. Because the fit reacts quickly, those crosses come early and need a second opinion.

Distance matters too. Candles running far above the line show a stretched move that usually snaps back toward it. A close that hugs the line points to balance.

Alert channels in this build: popup, push notification, email and sound, one message per closed bar.

EnableAlerts gates the whole set, and popup, push notification, email and sound each toggle on their own. SoundFile names the file the terminal plays, and the dispatcher sends one message per closed bar.

Every No Supply No Demand Indicator input

Core settings

Setting What it does Default
Period Sets how many closes enter the least-squares fit, 28 by default; shorten it for scalping and lengthen it for swing reads. 28

Alert settings

Setting What it does Default
EnableAlerts (see inputs panel) on
EnablePopup (see inputs panel) on
EnablePushNotify (see inputs panel) off
EnableEmail (see inputs panel) off
EnableSound (see inputs panel) off
SoundFile (see inputs panel) alert.wav
no supply no demand indicator: Inputs panel with the Period setting above the alert switches for this build.
Inputs panel with the Period setting above the alert switches for this build.

Settings that fit your chart

A single regression baseline suits any market with continuous quotes. The screenshots come from EURUSD H1, where the shipped window covers a little more than a trading day. Majors, gold and the major indices all read the same way. Faster charts such as M5 turn the line into a scalping filter, with more crosses and more noise. On H4 and D1 it acts as a slow trend guide that few candles cut through.

When the No Supply No Demand Indicator fails

The name promises more than the code delivers. This build plots a regression baseline, not a bar-by-bar test for the classic no supply and no demand patterns. Read it as a trend line and nothing else.

Regression baselines whipsaw in a range. Price oscillating around a flat fit produces cross after cross, and the dispatcher will happily send one every bar.

The fit has no memory of structure. It never checks swing highs, session times or ranges, so a level that matters to other traders means nothing here.

Early bars stay unreliable. Anything before the first full window never receives a value, so the far left of a freshly loaded chart can show an artefact until you scroll away.

Copy no-supply-no-demand-indicator-indicator-forexmt4systems.ex4 into MQL4/Indicators and no-supply-no-demand-indicator-indicator-forexmt4systems.ex5 into MQL5/Indicators, then restart the terminal and drag the No Supply No Demand Indicator onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.

Download the No Supply No Demand Indicator for MT4 and MT5

The zip no-supply-no-demand-indicator-indicator-forexmt4systems.zip holds no-supply-no-demand-indicator-indicator-forexmt4systems.ex4, no-supply-no-demand-indicator-indicator-forexmt4systems.ex5 and a short README, compiled files only. Enter your email below and the download link arrives in your inbox.

Download this indicator free

Enter your email and the file is yours. You also get the full MT4 and MT5 library.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

Does the No Supply No Demand line redraw on the current bar?

The value on the newest candle updates while that candle moves, because its close feeds the fit. Once the bar closes the point stops changing. Older points stay fixed unless the chart reloads its history. The alert reads bars that have already closed, so it never fires twice for one crossing.

What does the Period setting change about the line?

It sets how many closes enter each least-squares fit. At the shipped length the plot reacts within about a day of H1 candles. Shorter settings make it flick around price and produce more crosses. Longer settings smooth it into a slow guide that rarely cuts through the candles.

Why does the plot show the label No in the data window?

The buffer inherits its label from the indicator properties, which carry the first word of the product name. It marks the single regression baseline and nothing else. Your data window therefore reads No followed by the current value. Changing it needs a rebuild, so treat the label as cosmetic.

Which chart suits this baseline on EURUSD, H1 or M5?

H1 with the shipped window covers a bit over a trading day and gives a steady guide. M5 turns the same maths into a fast scalping filter, with far more crosses and far more noise. Choose the one that matches your holding time, then judge the crosses against the wider trend.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the No Supply No Demand Indicator as one input. Always backtest before trading live.

About the author

Category: this is part of our Trend collection. Browse more Trend for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.

External references

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment