# VolumeUpDown

#### Description <a href="#description_143" id="description_143"></a>

This indicator is a variation of the volume indicator, with the slight difference that the volume bars are shown in different colors depending on whether the price movement forms an up or down bar. An up (rising) bar shows the volume in green, while a down (falling) bar shows the volume in red. A Doji, where open = close, shows the volume in blue.

#### Usage <a href="#usage_129" id="usage_129"></a>

```csharp
VolumeUpDown()
VolumeUpDown(IDataSeries inSeries)
VolumeUpDown()[int barsAgo]
VolumeUpDown(IDataSeries inSeries)[int barsAgo]
```

#### Return value <a href="#return-value_127" id="return-value_127"></a>

**double**

When using this method with an index (e.g. **VolumeUpDown**()\[**int** barsAgo] ), the value of the indicator will be issued for the referenced bar.

#### Parameter <a href="#parameter_12" id="parameter_12"></a>

inSeries Input data series for the indicator

#### Visualization <a href="#visualization_132" id="visualization_132"></a>

![VolumeUpDown](https://agenatrader.github.io/AgenaIndicator-documentation/media/VolumeUpDown.jpg)

#### Example <a href="#example_123" id="example_123"></a>

```csharp
//Output of the current volume
Print("The current volume is " + VolumeUpDown()[0]);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://indicators.agenatrader.com/standard-indicators/volumeupdown.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
