MIDAS OBV Indicator: A Running Volume Total By Direction

Written by Dominic Walsh · Published · Last updated

The midas obv indicator keeps one running total. An up close adds the bar volume to it, a down close subtracts, and an unchanged close leaves the total alone. That single rule is the whole calculation, and it has not changed since Granville described it.

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 1: OBV
Alerts popup, push notification, email, sound
Inputs 7

On the chart: plots and colours

OBV is a single medium orchid line in its own pane.

The scale is cumulative, so it grows or shrinks without bounds.

There is no signal line and no level to compare against.

Nothing appears on the price chart itself.

  • OBV: plot, medium orchid
MIDAS OBV indicator on EURUSD H1 with the running directional volume total
MIDAS OBV indicator on EURUSD H1 with the running directional volume total

How a value appears

The three cases

A close above the previous one adds v to the running total. A close below subtracts it. An unchanged close carries the previous value forward untouched.

Choosing the volume field

`UseTickVolume` `true` reads the tick volume field. Setting it false reads the broker real volume instead. Most forex feeds report nothing useful there, which is why the tick option ships as the default.

Why the scale means nothing

The total starts from wherever the chart history begins, so its absolute value is arbitrary. Only the shape matters. A rising line means up closes have been carrying more volume than down ones.

How to work with it

Read the direction of the line, never its level.

A rising line with flat price is the classic divergence traders watch for.

Tick volume counts price updates rather than contracts traded.

The line jumps at the chart edge when history loads, which is normal.

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

The alert block sits behind `EnableAlerts`, which starts on. `EnablePopup` carries the text. Phone push, mail and sound sit behind `EnablePushNotify`, `EnableEmail` and `EnableSound`, all false at first. `SoundFile` names the clip. One message follows each closed bar.

Every Midas Obv Indicator input

Core settings

Setting What it does Default
UseTickVolume Reads tick volume rather than the real volume field, default `true`. on

Alert settings

Setting What it does Default
EnableAlerts Master toggle over the whole alert block, default `true`. on
EnablePopup Raises the terminal dialog when the total turns, default `true`. on
EnablePushNotify Sends the turn to your phone, default `false`. off
EnableEmail Mails the turn through the terminal, default `false`. off
EnableSound Plays a file when the total turns, default `false`. off
SoundFile Name of the wav file that alert plays, default `alert.wav`. alert.wav
MIDAS OBV indicator inputs: UseTickVolume and the alert switches
MIDAS OBV indicator inputs: UseTickVolume and the alert switches

Matching chart to settings

A cumulative total works on any chart, since only its shape carries meaning. EURUSD H1 is the reference chart. On M5 the line moves in small steps and the shape reads clearly. On daily bars each step is large and the line looks blocky.

What it handles badly

Tick volume differs between brokers, so two feeds give different lines.

The whole bar volume counts as one direction, however the bar traded inside itself.

The starting value depends on chart history, so the level is meaningless.

Copy the compiled Midas Obv 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.

Background reading on the method behind the Midas Obv Indicator: On Balance Volume OBV at StockCharts ChartSchool, iobv (OBV) at the MQL5 Documentation.

Download the Midas Obv Indicator for MT4 and MT5

The zip holds the compiled Midas Obv 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

Should UseTickVolume stay true?

On forex, almost certainly. There is no central exchange, so the real volume field usually holds nothing meaningful. Tick volume counts price updates, which tracks activity well enough to make the line worth reading.

Why does the OBV line have no scale?

Because the total starts from wherever your chart history begins. Load more bars and every value shifts. Only the shape carries information, which is why traders compare its direction against price rather than reading numbers.

What does UseTickVolume do on an unchanged close?

Nothing at all. The running total carries forward untouched, whichever volume field it reads. That third case matters most on instruments with small tick sizes, where identical closes flatten stretches of the line.

Is assigning the whole bar volume to one direction fair?

It is crude, and worth knowing. A bar that traded up then down still counts entirely as whichever way it closed. Volume profile tools split the same volume across price levels instead.

Are results guaranteed?

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

Category: this is part of our Volume collection. 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