Volumes VolumeConfirmationMT5 Built-in Disponible dans Builder

Volumes

Volumes is the tick count of a bar copied straight into buffer 0 — no smoothing, no warm-up, no period to set. The one comparison MetaTrader makes lives in buffer 1, the colour, and it paints equal counts as a fall; the Builder can only read buffer 0, so a flow that wants to know whether activity rose has to rebuild that comparison from nodes.

Buffers
2 — data and colour
Warm-up bars
0
Bars painted as a fall on a tie
0.9% to 16.7%
Surge bars, marked in the direction of their own candle1.5x the last three bars — the entry1.0x — the average, and the exitRelative tick volume (derived — buffer 0 is the raw count)

Illustratif — données synthétiques, pas une cotation en direct.

What Volumes tells you

Every other indicator on this hub computes something. This one does not. MetaTrader's Volumes assigns the bar's tick count into its output buffer and stops, so what you are reading is the rates array with a handle wrapped around it. On FX that count is the number of price updates the broker sent during the bar, not the size that changed hands — a busy minute and a large trade look the same. Two consequences run through the whole page. The first is that MetaTrader's only judgement about volume lives in the second buffer, the colour. It asks whether this bar beat the last one, and it asks with a strict greater-than, so equal counts are painted as a fall. The second is that the raw number does not transfer between instruments or timeframes. That is why the template divides rather than thresholds, and why almost every measured statement here is a range across market types rather than a single figure.

  • No period, no smoothing, no warm-up — the indicator adds a handle, not a calculation
  • MT5's own colour rule paints ties as a fall, so red is the more common colour
  • Absolute counts do not transfer; a ratio against recent bars does
  1. 1 The terminal counts price updates while a bar is open
  2. 2 Buffer 0 receives that count unchanged; buffer 1 records whether it beat the previous bar
  3. 3 A flow divides the count by a recent average to get a number that travels between instruments
Afficher la formule et les détails de calcul

MetaTrader’s Volumes does not calculate anything. Its OnCalculate walks the bars and assigns the count into the output buffer, then records one comparison in a second buffer:

buffer0[i] = (double)volume[i]                 <- the rates array, unchanged
buffer1[i] = (volume[i] > volume[i-1]) ? 0 : 1 <- the colour; strict >, so a tie is "1"

volume[] is the tick volume unless the indicator is created with VOLUME_REAL, which the Builder never does. There is no period, no moving average and no PLOT_DRAW_BEGIN: the value for a bar is complete as soon as the bar exists, and the first bar of the buffer is set before the loop starts.

Everything else on this page is built on top of that by the flow, not by the indicator. The template’s relative volume is

avg = (v[2] + v[3] + v[4]) / 3        <- shifts 2, 3 and 4
rel = (avg != 0) ? v[1] / avg : 0     <- shift 1, the last closed bar

which is a ratio and therefore comparable between instruments, unlike the count itself.

In MQL5 the call is iVolumes(symbol, period, applied_volume). The third argument is an applied volume, not an applied price — the indicator has no price input at all, which is why this page’s applied-price section says the concept does not apply rather than saying “fixed to Close”. The generated EA reads the result with CopyBuffer(handle, 0, shift, 2, buf), so buffer 1 — the colour, and with it the platform’s only opinion about whether a bar was busier than the last — never leaves the terminal.

Signaux

Les signaux distincts et testables que génère Volumes — et le régime adapté à chacun.

Activity Surge

Prêt dans Builder
Condition
The closed bar's count is more than 1.5x the average of the three bars before it
Meilleur régime
Either regime
Utilisation typique
The template's entry, paired with the direction of the surge bar itself

Back to Average

Prêt dans Builder
Condition
Relative volume returns to 1.0 — the bar is no busier than its recent neighbours
Meilleur régime
Either regime
Utilisation typique
The template's exit. It is the same measurement as the entry, read from the other side

Quiet Bar Veto

Prêt dans Builder
Condition
Relative volume is below 1.0 while another rule wants to enter
Meilleur régime
Ranging
Utilisation typique
A filter rather than a trigger — the cheapest honest use of this indicator

New Extreme on Falling Activity

Logique avancée
Condition
Price posts a higher high or lower low while volume fails to expand
Meilleur régime
Trending
Utilisation typique
Widely described, but it needs swing recognition across many bars — not a comparison

Implémentation MT5

Ce que MetaTrader 5 calcule et trace réellement — la référence de chaque règle de cette page.

Buffers

Index Buffer Tracé dans MT5 comme Ce qu'il contient
0 VOLUME Colour histogram The bar's volume, assigned straight from the rates array — the source is one line, ExtVolumesBuffer[i] = (double)volume[i]. No averaging, no lag, and nothing to warm up: the value for a bar is known the moment the bar exists. This is the buffer the Builder reads.
1 COLOR_INDEX Colour index for the histogram above 0 when this bar's count is strictly greater than the previous bar's, 1 otherwise. That strictness is the whole content of the colour: a bar with exactly the same count as the one before it is painted as a fall. Not reachable from the Builder, which always copies buffer 0.

Notes de plateforme

Fonctionne mieux / utiliser avec prudence

Aucun indicateur n'est un avantage universel. Voici où Volumes aide — et où il induit en erreur.

Fonctionne mieux

  • As a second condition on a rule that already has a reason to trade
  • Timeframes where a bar holds enough ticks that a tie is rare
  • Instruments and sessions you have measured, because the thresholds do not transfer
  • Flows that compare volume with volume, rather than with a fixed number

Utiliser avec prudence

  • Reading tick volume as traded size — on FX it is a count of price updates
  • Fixed thresholds such as 'volume above 500', which mean different things per symbol and timeframe
  • Comparisons on shift 0, where the count is still growing and the answer changes within the bar
  • Assuming a busier bar is a more meaningful bar; the indicator has no opinion about direction

Créer une stratégie Volumes

Connectez le signal aux règles d'entrée et de sortie, puis exportez un EA MT5 compilable — sans code.

  1. Four Volumes nodes, reading the last closed bar and the three before it
  2. Two adds, a constant and two divides, producing the ratio the flow compares
  3. Ratio above 1.5 and the bar closing above its open → Open Buy · SL 60 / TP 60
  4. Ratio above 1.5 and the bar closing below its open → Open Sell, mirrored
  5. Ratio back below 1.0 → Close, wired before the entries so it is emitted first

Combiner Volumes avec d'autres indicateurs

Un indicateur fonctionne rarement seul. Ces associations couvrent les angles morts de Volumes.

Volumes + BW MFI

  1. Volumes at two shifts
  2. BW MFI at two shifts
  3. And gate
Pourquoi
This is the pairing MetaTrader itself makes. Bill Williams' Market Facilitation Index is range divided by volume. The four states he named come from asking whether MFI and volume each rose against the previous bar, and the green bar is both rising together. The Builder has a template for it. It is worth opening next to this one, because it shows the same rebuild problem from the other side: the colour that names the state is not readable from a node, so the template reads two MFI bars and two volume bars and reassembles the condition with an And gate
Meilleur régime
Either regime
Créer cette stratégie →

Volumes + Donchian Channel

  1. Donchian upper band
  2. Volumes above its recent average
  3. And gate
Pourquoi
A breakout rule is the classic place where activity is asked to confirm. It also fits better than the direction-of-the-candle test the template uses, because a channel break is an event you can define without reference to volume at all. The honest framing is narrow: this pairing does not make a break more likely to continue — nothing here measures that — it removes breaks that happened on a bar nobody was trading
Meilleur régime
Trending

No single template holds both. Add a Donchian node with a Cross of price against the upper band, then join it to the relative-volume Compare with an And gate.

Ouvrir Builder →

Volumes + ATR

  1. ATR at 14
  2. Volumes above its recent average
  3. Stop loss in ATR mode
Pourquoi
Range and activity are different measurements that people often treat as one. A bar can hold twice the usual number of ticks inside a narrow range, which is congestion rather than a move. It can also travel a long way on very few ticks, which is a gap or a thin session. Reading both makes the difference visible. It also fixes the one part of the template that does not travel: the 60-pip stop is a fixed distance, while everything else in the flow is deliberately scale-free
Meilleur régime
Either regime

Add an ATR node and switch the Stop Loss node to its ATR mode; the volume side needs no change.

Ouvrir Builder →

Paramètres

Valeurs de départ à valider sur votre propre paire et timeframe — pas des réglages garantis.

Paramètre Défaut Plage de test suggérée Ce que ça fait
Applied volume Tick iVolumes accepts VOLUME_TICK or VOLUME_REAL, and the Builder always passes VOLUME_TICK. Real volume is not available from most FX brokers — it is reported as zero — so the node does not offer the choice. On an exchange-traded symbol where real volume does exist, the generated EA still reads the tick count.
Shift 1 0–100 Which bar the node reads. The template uses 1 so that decisions are made on a closed bar. Shift 0 is the bar still forming, where the count only grows: a comparison against it is true or false depending on when in the bar you ask, and it can flip several times before the bar closes.
Timeframe Current Current / M1–MN1 Which timeframe's bars are counted. This matters more here than for most indicators, because the typical count per bar is what decides how noisy the ratio is and how often ties occur — the same threshold behaves differently on M1 and H1 on the same instrument.
Bars in the average (template) 3 2–20 How many bars the flow averages before dividing. This is not a setting of the indicator: the Builder has no average-of-volume node, so the template builds the average from one Volumes node per bar. Raising it means one more handle per bar and a steadier denominator.
Surge threshold (template) 1.5 1.2–3.0 How far above the recent average the bar has to be. Measured on five synthetic tick-count series, the same 1.5 fired on 0.00% of bars in a structureless series averaging 100 ticks and on 18.89% in one with a daily cycle — so this is the number to re-measure first when you change instrument or timeframe.
Exit threshold (template) 1.0 0.6–1.0 The level relative volume must fall back through to close the position. Lowering it makes the hold longer and much less predictable: at 0.6 one of the five series reached a 50-bar cap on 51.4% of trades, while at 1.0 no series reached it at all.

Préréglages de départ

Template 1.5x entry / 1.0x exit / 3-bar average Four handles, and no exit that can outlast the measurement
Filter only Above 1.0x as a second condition The cheapest use — no entry of its own, and nothing to fit
Rare and slow 2.0x entry / 0.8x exit Fewer entries and longer holds; verify the hold on your own data before using it

Exemples de marché

Où Volumes fonctionne, où il échoue et comment un filtre change le résultat.

Fonctionne

A break that someone traded

Price leaves a range on a bar carrying several times the recent number of ticks, and the flow takes the direction of that bar. The position is closed a few bars later when activity is back to normal, whether or not price is.

Échoue

The busy bar that went nowhere

A burst of ticks inside a narrow range — an argument rather than a move. The count says the bar was busy, the indicator has nothing to say about direction, and the candle's own open and close are all the flow has to go on.

Filtré

The quiet hour

The same pattern arrives in a thin session. Relative volume never reaches the threshold, so nothing is taken — and on thin bars the ratio is at its noisiest, which is the case for measuring the threshold per session rather than trusting one number.

FAQ

Is MT5's Volumes real traded volume?
Only where the broker provides it, and the Builder never asks for it. The indicator takes an applied-volume argument that can be VOLUME_TICK or VOLUME_REAL, and the generated EA always passes VOLUME_TICK — the number of price updates in the bar. On most FX feeds real volume is reported as zero, which is why the node does not offer the choice.
Why does the histogram look red more often than green?
Because MetaTrader paints ties as a fall. The colour buffer is `curr > prev ? 0 : 1`, a strict comparison, so a bar with exactly the same count as the previous one gets the falling colour. On synthetic counts with no trend in activity, green appeared on 41.70% of bars at a mean of 3 ticks and 49.57% at a mean of 1000 — the missing share is the tie rate, 16.70% and 0.90% respectively. The effect is only visible on thin bars.
Can I read the colour buffer from the Builder?
No. The codegen copies buffer index 0 for this node, and only the Custom Indicator node lets you choose a buffer index. Rebuilding the comparison costs a second Volumes node at the next shift plus a Compare, and it reproduces the platform's answer exactly as long as the Compare uses a strict greater-than. The BW MFI template already contains that rebuild if you want to see it wired up.
What is a good volume threshold?
There is no such number, and that is the most useful thing this page can say. The same 1.5x rule fired on 0.00% of bars in a structureless series averaging 100 ticks and on 18.89% in one with a daily cycle, with three other series between. A threshold on the raw count is worse still, because the count scales with the instrument, the timeframe, the session and the broker's feed. Measure the rate on your own data before choosing, and re-measure when any of those change.
Why does the template use four Volumes nodes?
Because there is no node that averages volume, and a Compare node reads only the current value of its inputs. Reading four bars therefore means four nodes, which become four iVolumes handles created with identical arguments — the shift is applied in the CopyBuffer call, not when the handle is made. A single node does copy the bar you point at and the one before it, but that second value is reachable only through a Cross node.
Can I change the surge threshold in the EA's inputs?
No. Compare nodes write their threshold into the code as a literal, so the compiled EA carries `vol_rel > 1.5` and offers inputs only for the magic number, slippage, once-per-bar, lot size, the two stop distances and the maximum spread. Changing the threshold means editing the flow in the Builder and generating again.
Does a volume surge mean the move will continue?
Nothing on this page claims that, and nothing measured here could establish it. The measurements are of how often rules fire and how long the flow holds, on synthetic series with known properties — a question about the rules rather than about markets. Whether activity carries information about the next move needs your own instrument, your own costs and an out-of-sample test. That is also why the template's exit is defined by the same measurement as its entry rather than by a profit target.
Can I build this without coding?
Yes. The template is four Volumes nodes feeding two adds, a constant and two divides to make the ratio, two Compare nodes for the entry and exit thresholds, two OHLC nodes for the direction of the surge bar, two And gates, and Open Buy / Open Sell / Close. The stop distances, lot size and maximum spread are EA inputs; the thresholds and the averaging length are set in the Builder.

Glossary

Termes clés