Skip to main content

mzVolumeDelta

The mzVolumeDelta indicator combines a Buy/Sell Volume indicator and a Delta indicator with iceberg search algorithms. It displays volume and delta data in a separate chart panel below the price chart.

Data required: Level 1 (tick data)

Key Features

  • 2 primary modes — Volume and Delta
  • Volume mode with buy/sell breakdown and iceberg detection
  • Delta mode with histogram, candles, and cumulative delta
  • 3 volume alignment styles — Total, Stacked, Opposite
  • 5 color modes — Solid, Saturation, Heatmap, GrayScaleHeatmap, Custom
  • 2 color coding schemes — UpDown and Delta
  • Trade size filters — min/max trade size filtering
  • Iceberg order detection with Hard/Soft algorithms
  • Alerts for volume, delta, and iceberg thresholds with custom sounds
  • 5 NinjaScript plots — Volume, Buy Volume, Sell Volume, Delta, Cumulative Delta

Indicator Modes

ModeDescription
VolumeDisplay buy/sell volume histograms per bar
DeltaDisplay delta histograms, delta candles, or cumulative delta

Volume Mode

When Mode is set to Volume, the indicator shows volume bars with optional iceberg detection.

Volume Display

ShowDescription
VolumeTotal volume bars only
IcebergsIceberg volume only (requires Reconstruct tape)
BothVolume and icebergs together (requires Reconstruct tape)

Volume Alignment

Controls how buy and sell volumes are arranged within each bar:

AlignDescription
TotalSingle bar showing total volume
StackedBuy and sell volumes stacked in one bar
OppositeBuy and sell volumes as separate bars on opposite sides of the zero line

Iceberg Detection

Iceberg orders are large hidden orders that are executed in smaller visible portions. The indicator detects iceberg activity using two algorithms:

AlgorithmDescription
HardStrict detection — requires strong evidence of iceberg behavior
SoftRelaxed detection — flags more potential iceberg activity

Note: The Reconstruct tape option (under General settings) must be enabled for iceberg features to work. When Reconstruct tape is off, the Show setting must be set to Volume (icebergs are unavailable).

Delta Mode

When Mode is set to Delta, the indicator shows the difference between buy and sell volume (delta).

Delta Display

ShowDescription
HistogramDelta per bar rendered as vertical bars
CandlesDelta displayed as OHLC-style candles
CumulativeRunning cumulative delta across the session

Cumulate Session Only

When enabled (default: true), cumulative delta resets at the beginning of each new trading session. When disabled, cumulative delta accumulates continuously across sessions.

Color Modes

Controls how bars are colored based on their values:

ModeDescription
SolidUniform selected color for all bars
SaturationColor intensity scales with volume/delta values — higher values are more saturated
HeatmapMulti-color gradient from cool to hot based on values
GrayScaleHeatmapMonochrome intensity gradient
Custom4-level color thresholds with separate buy/sell colors

Color Coding

CodeDescription
UpDownColor by chart bar direction — up bars use buy color, down bars use sell color
DeltaColor by delta value sign — highlights volume bars where delta is significant

Bar Color Scale

ScaleDescription
ChartMaximum value for color coding is calculated from visible bars on the chart
AllMaximum value is calculated from all loaded bars

Custom Color Thresholds

When Color mode is set to Custom, bars are colored based on 4 value thresholds with separate colors for buy/positive and sell/negative sides:

ThresholdBuy/Positive DefaultSell/Negative Default
Less than 1000 (#0)GrayGray
1000 or more (#1)GreenDarkRed
7000 or more (#2)LimeRed
10000 or more (#3)CyanDeepPink

Settings Reference

Common

SettingDefaultDescription
ModeDeltaPrimary indicator mode — Volume or Delta
Bar widthAutoBar width mode — Auto (follows chart bar width) or Custom
Bar width, px10Custom bar width in pixels (when Bar width = Custom)
Zero linetrueShow horizontal zero line

Filters

SettingDefaultDescription
Trade min0Minimum trade size — trades smaller than this value are not counted
Trade max-1Maximum trade size — trades larger than this value are not counted (-1 = unlimited)
Display color0Bars with values below this threshold are rendered with the "Below display color"
Below display colorGrayColor for bars below the Display color threshold

Note: Changing Trade min or Trade max requires reloading the indicator (press F5) to take effect.

Presentation

SettingDefaultDescription
Bar color scaleChartMaximum value source for color coding — Chart or All
Color codeUpDownColor coding scheme — UpDown or Delta
Color modeSolidColor rendering mode — Solid, Saturation, Heatmap, GrayScaleHeatmap, or Custom
Buy volume/Positive deltaGreenColor for buy volume or positive delta
Sell volume/Negative deltaRedColor for sell volume or negative delta
Custom 'less' filter #01000Upper bound for the lowest custom color tier
Custom 'gte' filter #11000First custom threshold
Custom 'gte' filter #27000Second custom threshold
Custom 'gte' filter #310000Third custom threshold
Buy/Positive color #0GrayBuy/positive color for values below filter #0
Buy/Positive color #1GreenBuy/positive color for values at or above filter #1
Buy/Positive color #2LimeBuy/positive color for values at or above filter #2
Buy/Positive color #3CyanBuy/positive color for values at or above filter #3
Sell/Negative color #0GraySell/negative color for values below filter #0
Sell/Negative color #1DarkRedSell/negative color for values at or above filter #1
Sell/Negative color #2RedSell/negative color for values at or above filter #2
Sell/Negative color #3DeepPinkSell/negative color for values at or above filter #3
Bar borderDarkGrayVolume bar border stroke
Buy IcebergFuchsiaBuy-side iceberg volume color
Sell IcebergFuchsiaSell-side iceberg volume color
Candle/Bar borderDarkGrayDelta candle border stroke
Candle wick/Zero volumeDarkGrayDelta candle wick stroke
Scale plots: VolumefalseInclude Volume plot in chart scale calculation
Scale plots: Buy VolumefalseInclude Buy Volume plot in chart scale calculation
Scale plots: Sell VolumefalseInclude Sell Volume plot in chart scale calculation
Scale plots: DeltafalseInclude Delta plot in chart scale calculation
Scale plots: Cumulative DeltafalseInclude Cumulative Delta plot in chart scale calculation

Volume Mode

SettingDefaultDescription
ShowBothWhat to display — Volume, Icebergs, or Both
AlignOppositeVolume bar alignment — Total, Stacked, or Opposite
Iceberg algorithmHardIceberg detection algorithm — Hard or Soft
Volume alert: enablefalseEnable bar volume alert
Volume alert: threshold1000Volume value to trigger the alert
Volume alert: soundmzpack_alert2.wavAlert sound file
Iceberg alert: enablefalseEnable iceberg volume alert
Iceberg alert: threshold100Iceberg volume value to trigger the alert
Iceberg alert: soundiceberg.wavAlert sound file

Delta Mode

SettingDefaultDescription
ShowCandlesDelta display style — Histogram, Candles, or Cumulative
Cumulate session onlytrueReset cumulative delta on each new session
Bar Delta alert: enablefalseEnable bar delta alert
Bar Delta alert: threshold1000Absolute delta value to trigger the alert
Bar Delta alert: soundmzpack_alert1.wavAlert sound file
tip

See Sound Files for the full list of pre-installed sounds and how to add custom WAV files.

Plots

The indicator exposes 5 NinjaScript output plots that can be used by other indicators and strategies:

PlotDescription
VolumeTotal bar volume
Buy VolumeBuy-side (ask) volume
Sell VolumeSell-side (bid) volume (displayed as negative)
DeltaBar delta (buy volume minus sell volume)
Cumulative DeltaRunning cumulative delta

Set any non-transparent color for a plot to display the current value marker on the chart scale. Use the Scale plots toggles in Presentation settings to include specific plots in the chart scale calculation.

Non-Bid/Ask Data Support

Some markets (Forex, cryptocurrencies, NSE/Indian stock market) do not provide historical bid/ask data. Without it, all historical trades appear on the Bid side only.

Solution: Set Orderflow > Calculation mode to UpDownTick for these instruments.

Hybrid mode (NSE): NSE data providers do not transmit historical bid/ask data. Use Hybrid mode, which applies UpDownTick calculation for historical data and BidAsk for real-time data.

Recommendation: For Forex pairs, use the relevant futures contract (e.g., 6E for EURUSD) to get accurate bid/ask data and full order flow features.