> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# Volume

## Definition

A collection of historical bar volume values.

For working with **Cryptocurrency instruments** which report volume fractional, please use the **VOL()** indicator series, or store the volume for your script in a custom variable and convert alongside our **VOL()** indicator (`Instrument.MasterInstrument.InstrumentType == InstrumentType.CryptoCurrency ? Core.Globals.ToCryptocurrencyVolume((long)Volume[0]) : Volume[0]`).

## Property Value

An **ISeries`\<double\>`** object. Accessing this property via an index `[int barsAgo]` returns A **double** value representing the volume of the referenced bar.

## Syntax

`Volume`

`Volume[int barsAgo]`

## Examples

```csharp
// OnBarUpdate method**
protected override void OnBarUpdate()
{
     // Is current volume greater than twice the prior bar's volume
     if (Volume[0] > Volume[1] * 2)
         Print("We have increased volume");

     // Is the current volume greater than the 20 period moving average of volume

     if (Volume[0] > SMA(Volume, 20)[0])

         Print("Increasing volume");
}
```