Home › Guides › Volume Indicator

WHY BOTS FAILFREENO ACCOUNTAUTOMATED TRADE BOTSVolume IndicatorThe arithmetic of how bots failEDUCATION ONLY | NO SIGNALSEXAMPLE NUMBERS ARE LABELLEDAUTOMATED TRADE BOTSautomatedtradebots.com
A free page on volume indicator. Education only, with example numbers labelled.
WHY BOTS FAIL

Volume Indicator

Short answer

Volume is the amount traded in a bar: the number of shares, contracts, coins or lots that changed hands. It is a count of activity, not a direction.

Volume counts how much was traded in each bar. Indicators built on it add up, average or compare those counts, and a bot can only be as good as the count it is given.

The page explains the idea in plain words, works through the arithmetic with a table, and shows how it hits grid, martingale and DCA bots, then tells you what to check before you run one.

  • A worked example with real arithmetic
  • How it hits grid, martingale and DCA bots
  • How to check for it before you run a bot
  • No advice, no signals, no profit promises

Last reviewed 28 October 2026. Education only, not advice.

Free, no account Runs in your browser Worked numbers shown Not advice Examples labelled

Ready to go further

Next: see volume across prices

The volume profile puts volume on the price axis, which answers a different question from a column under each bar.

Reading time8 minutes
Worked exampleExact arithmetic
Tools linked0 on this page
Reviewed28 Oct 2026

What is included

  • What it is, in plain words
  • The formula or mechanism, with exact arithmetic
  • How it hits grid, martingale and DCA bots
  • A check you can run before you switch a bot on

Who it is for

  • People who run or plan to run a trading bot
  • Anyone reading a backtest or a bot sales page
  • Readers who want the numbers, not the pitch
  • Not advice, and not a signal service
Volume per bar in a made-up 10 bar example500Bar 1close 100700Bar 4close 1011,500Bar 7close 1041,100Bar 10close 100Made-up volumes in units traded. Bar 7 is a spike against the average of the five bars before it.
The picture for this page. Example numbers are made up unless the page says they were calculated.

Key facts

  • Volume is the amount traded in a bar: the number of shares, contracts, coins or lots that changed hands. It is a count of activity, not a direction.
  • On-balance volume (OBV) adds the bar volume when the close is up, subtracts it when the close is down, and adds nothing when it is unchanged. In the made-up example below it ends at -200 (calculated by us on 31 Oct 2026, exact).
  • A volume moving average smooths the count. In the example the average of bars 2 to 6 is 580, and bar 7 trades 1,500, which is 2.6 times that. That is a volume spike.
  • In crypto and forex there is often no single volume figure. Each venue reports only its own trades, so the same market can show different volume on different feeds.
  • Volume does not say who was buying or selling, or what happens next. A bot that treats a spike as a signal on its own has no tested basis for it.

What volume measures

Every trade has two sides: a buyer and a seller. Volume counts the size of each trade once. If one trader sells 10 units and another buys the same 10, volume is 10, not 20. It tells you how busy the market was, and nothing about which side pushed.

Volume is usually drawn as a column under each bar of the price chart. A tall column means a busy bar. A short column means a quiet one. On its own, a number such as 900 means little. It only means something compared with the volume of other bars in the same market, and on the same feed.

What counts as a unit depends on the market. On a stock chart it is shares. On a futures chart it is contracts. On a crypto chart it is coins. Some feeds report tick volume, which counts price updates instead of units. Tick volume is a stand-in. It tends to rise and fall with real volume, but it is a different number, so do not mix the two.

On-balance volume

On-balance volume is a running total. It starts at zero. For each bar it looks only at whether the close went up or down against the previous close.

If close is above the previous close: OBV = previous OBV + volume
If close is below the previous close: OBV = previous OBV - volume
If the close is unchanged: OBV = previous OBV

The idea is that volume on up bars is buying pressure and volume on down bars is selling pressure. That is a rough guess. A bar that closes up by one cent has all its volume counted as up volume, even if half of it was selling. OBV is a crude tool, and its crudeness is the first thing to know about it.

A worked example

The table uses ten made-up bars. Take bar 2. The close rises from 100 to 101, so OBV = 0 + 600 = 600. Bar 3 closes up again, so OBV = 600 + 550 = 1,150. Bar 4 closes down from 102 to 101, so OBV = 1,150 - 700 = 450. Bar 5 closes at 101, the same as bar 4, so OBV stays at 450. The last bar closes down, so OBV ends at -200. All of these are made-up numbers.

BarCloseVolumeOBV5-bar volume average
11005000-
2101600600-
31025501,150-
4101700450-
5101400450550
61036501,100580
71041,5002,600760
81039001,700830
9102800900850
101001,100-200990
On-balance volume of the made-up example02,600147100Bar numberMade-up closes and volumes. Calculated by us on 31 Oct 2026, exact.
OBV of the ten made-up bars. It rises on up closes and falls on down closes, and the size of each step is that bar volume.

The volume moving average

A volume moving average is the plain average of volume over the last N bars. Common choices of N are 20 and 50, but the table uses 5 so the sums fit on a page.

Volume average (N bars) = (sum of the last N volumes) / N

For bar 6 in the example: (600 + 550 + 700 + 400 + 650) / 5 = 580. A bot can compare the current bar with this line. A bar well above it is busy for this market. A bar well below it is quiet.

Volume spikes

A volume spike is a bar with much more volume than the recent average. A bot needs a number for "much more", so it picks a multiple, such as 2 times. In the example, bar 7 has 1,500 against an average of 580 over the five bars before it. The ratio is 2.59, so a 2 times rule would flag it. A 3 times rule would not.

Notice what the rule is doing. It picks a window length and a multiple. Both are settings, and both can be tuned until the past looks good. That is the road to overfitting. The spike also does not tell you why it happened. Heavy volume can come with news, with a large order being worked in pieces, with stops being hit, or with nothing a chart can explain. A spike with a breakout is sometimes read as "real", and a breakout on thin volume as suspect. That is a way of reading charts, not a measured rule. Test it before relying on it. The pages on the breakout indicator and the false breakout show how a plain breakout rule can be fooled and how to count it.

The problem of volume by venue

Volume is easiest to trust where all trades go through one place. Many stocks and futures contracts report a consolidated figure, though even there some trades are reported late or in blocks.

Crypto and forex are different. There is no single book. Crypto trades on many exchanges at once, and each reports only its own trades. A coin can show one volume on one feed and a different volume on another, and some venues report numbers that have never been checked by anyone outside. Spot volume and derivatives volume are also different things, and a feed may or may not mix them.

Forex is decentralised. A broker sees its own clients and its own liquidity providers, not the whole market. The volume on a forex chart is often tick volume from that broker. Two brokers can draw two different volume columns for the same pair at the same time.

The result for a bot is plain. A rule that says "volume above 2 times average" is a rule about one particular feed. Move it to another feed and it can behave differently. A volume figure may also be inflated by trades that do not change who holds what, such as one party trading with itself. Check what your feed counts and how your venue reports it. How this works varies by venue, so read the documentation of yours.

How a bot uses it, and where it fails

  • As a filter. The bot takes an entry from another rule only if volume is above its average. This cuts the number of trades. It does not show the filtered trades are better. Compare results with and without the filter, after costs.
  • As a confirmation of a breakout. The bot wants a spike on the break of a range. A spike can arrive on the bar that is later reversed, which is the false breakout case.
  • As divergence. The bot compares the direction of OBV with the direction of price. If price makes a higher high and OBV does not, some traders read that as weakness. Whether it holds up is an open question for any given market, and it needs a clear, testable definition of "higher high" before a bot can use it.
  • Together with price levels. Volume can be placed on the price axis instead of the time axis, as in the volume profile. Or it can be used to weight an average price, as in the VWAP indicator. Both answer a different question from a bar by bar column.

The common ways it fails are the ones already seen. Volume has no direction, so OBV guesses one from the close. The feed may not match the market. A volume average is slow to adapt after a quiet period, so the first busy bar always looks like a spike. A fixed multiple fits some periods and not others. Every setting adds a way to fit the past.

A deeper view of who was buying and who was selling needs trade by trade data, which is the subject of order flow. That data is larger, costs more to store, and has its own traps.

How to check a volume rule

Say exactly which feed and which units the rule uses. Run it on more than one market and more than one period. Count the trades, and look at the average result per trade after costs. Then compare against the same rule without the volume condition. If the volume condition does not change the result by more than the noise, it adds settings and no information. Keep some data back and test on it once.

What it does not tell you

It does not say who won the trade, and it does not forecast anything. It describes how much was traded. This page is education, and every number in it is made up.

FAQ

Frequently Asked Questions

What is a volume indicator?

A calculation built from the amount traded in each bar. Examples are the raw volume column, on-balance volume and a volume moving average. They measure activity, not direction.

How is on-balance volume calculated?

Start at zero. If the close is above the previous close, add the bar volume. If it is below, subtract it. If it is unchanged, add nothing.

What counts as a volume spike?

There is no fixed rule. A bot picks a window and a multiple, such as volume above 2 times the average of the last 20 bars. Both settings change what is flagged, so test them.

Why does volume differ between crypto and forex feeds?

Each venue or broker reports only the trades it sees, and some report tick counts instead of units. The same market can show different volume on different feeds.

Can a bot trade on volume alone?

It can, but volume has no direction and depends on the feed. Test any rule across markets and periods, with costs, against the same rule without volume.

Are the numbers on this page real?

Example numbers are made up to show how the maths works, and the page says so. A figure only counts as exact when the page says it was calculated on a stated date. Nothing you enter in a calculator leaves your browser.

Can I use this to decide whether to run a bot?

It can show whether a bot's numbers hold together and how much an account can lose. It cannot say what the market will do, and it is not advice. Use it to ask better questions, then read the terms of your own broker or exchange.

Is this financial advice?

No. It is general education about a calculation. The numbers are made up and it is not a signal.

Know the Risk Before You Run It

Free calculators and guides, added every week. Leave your details and we will email you when new ones go up.

Trading carries a risk of loss