> 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 Up Down

## Description

Variation of the [VOL](/developer/desktop-sdk/references/common/system-indicator-methods/volume) (Volume) indicator that colors the volume histogram different color depending if the current bar is up or down bar.

## Syntax

`VolumeUpDown()`

`VolumeUpDown(ISeries\<double\> input)`

**Returns default value**

`VolumeUpDown()[int barsAgo]`

`VolumeUpDown(ISeries\<double\> input](int barsAgo)`

## Return Value

**double**; Accessing this method via an index value `[int barsAgo]` returns the indicator value of the referenced bar.

## Parameters

| Parameter | Description                                                                                     |
| --------- | ----------------------------------------------------------------------------------------------- |
| input     | Indicator source data ([Series\<T>](/developer/desktop-sdk/references/common/iseriest/seriest)) |
| period    | Number of bars used in the calculation                                                          |

## Example

```csharp
// Prints the current value VolumeUpDown  
double value = VolumeUpDown()[0];  
Print("The current Volume value is " + value.ToString());
```

## Source Code

You can view this indicator method source code by selecting the menu New > NinjaScript Editor > Indicators within the NinjaTrader Control Center window.