Buy Sell Volume Indicator: Split By Candle Direction

Written by Dominic Walsh · Published · Last updated

The buy sell volume indicator sorts activity by candle direction. A bar that closed up sends its volume above the zero line. A bar that closed down sends it below. The result reads as two-sided rather than one column.

This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.

Platforms MT4 (.ex4) + MT5 (.ex5)
Chart window Separate window
Plots 4: Up Volume, Down Volume, Buy Spike, Sell Spike
Alerts popup, push notification, email, sound
Inputs 9

What the Buy Sell Volume Indicator draws on the chart

`Up Volume` fills lime columns above zero on bullish bars.

`Down Volume` fills tomato columns below zero on bearish ones.

`Buy Spike` uses arrow 233 and `Sell Spike` uses 234.

A doji sends its volume nowhere, so the pane shows a gap.

  • Up Volume: histogram, lime, width 3
  • Down Volume: histogram, tomato, width 3
  • Buy Spike: arrow, lime, width 3, arrow code 233
  • Sell Spike: arrow, red, width 3, arrow code 234
Buy sell volume indicator two-sided columns and spike arrows on the EURUSD H1 chart.
Buy sell volume indicator two-sided columns and spike arrows on the EURUSD H1 chart.

How the Buy Sell Volume Indicator calculates its values

Direction decides the side

Close above open sends the bar’s tick volume to the upper buffer. Close below open sends it to the lower one. The number itself is identical either way.

Spikes need a baseline

A running average across `AvgPeriod` `20` bars gives normal activity. A bar has to beat `SpikeMultiplier` `1.5` of that figure before it earns a mark.

Doji bars get skipped

`DojiTolerancePip` `0.5` treats a bar whose open and close sit within half a pip as directionless. Sorting such a bar into either side would be arbitrary, so the code leaves it out.

How to read the signals

Column height is activity, and the side is direction.

A tall lime column with a small candle means effort without progress.

Spikes cluster around news and session opens.

The reading uses tick volume, which counts updates rather than contracts.

Alert channels in this build: popup, push notification, email and sound.

`EnableAlerts` opens the set and ships true with `EnablePopup`. `EnablePushNotify` covers a handset, `EnableEmail` covers mail and `EnableSound` plays `SoundFile`. Those three arrive off. Note that no once-per-bar guard applies here.

Every Buy Sell Volume Indicator input

Core settings

Setting What it does Default
AvgPeriod Average period for volume baseline. Bars in the activity baseline, default `20`. 20
SpikeMultiplier Volume must exceed avg * this to mark a spike. How far above baseline a bar must reach, default `1.5`. 1.5
DojiTolerancePip Pips tolerance to treat bar as doji (skip). Pips within which a bar counts as directionless, default `0.5`. 0.5

Alert settings

Setting What it does Default
EnableAlerts Overall control of the routes, default `true`. on
EnablePopup Terminal window on a spike, default `true`. on
EnablePushNotify Handset message on a spike, default `false`. off
EnableEmail Mail on a spike, default `false`. off
EnableSound Clip on a spike, default `false`. off
SoundFile Which clip plays, default `”alert.wav”`. alert.wav
Buy sell volume indicator inputs panel with AvgPeriod and SpikeMultiplier.
Buy sell volume indicator inputs panel with AvgPeriod and SpikeMultiplier.

Settings that fit your chart

Tick counts need enough updates per bar to mean something. EURUSD H1 is the reference chart, where a bar carries thousands. On M1 the counts thin out and spikes get noisy. H4 smooths the picture considerably.

When the Buy Sell Volume Indicator fails

Forex tick volume counts price updates, and every broker counts differently.

Candle direction is a crude proxy for who was actually buying.

This build has no once-per-bar guard, so a spike alert can repeat.

Copy the compiled Buy Sell Volume Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.

Download the Buy Sell Volume Indicator for MT4 and MT5

The zip holds the compiled Buy Sell Volume Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. 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

What does SpikeMultiplier 1.5 measure against?

The twenty-bar average of tick volume. A bar must reach one and a half times that figure to earn a mark. Raise it to two or three if you only want the genuinely unusual bars marked.

Why does DojiTolerancePip 0.5 exist?

Because a bar that opens and closes at the same price has no direction to sort by. Half a pip of tolerance catches those, and the code leaves them out rather than assigning them arbitrarily.

Does Up Volume mean buying pressure?

Only loosely. It means the bar closed above its open and carried that much activity. Who was buying and who was selling is not something a tick count can tell you.

How does AvgPeriod 20 affect the marks?

It sets how far back normal gets measured. A short baseline adapts quickly to a busy session, so fewer bars look unusual. A longer one keeps the standard steady across the day.

Are results guaranteed?

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

Category: this is part of our Volume collection. Next, plainly, truly, browse more Volume 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