> 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.

# Vortex

## Description

The Vortex indicator is an oscillator used to identify trends. A bullish signal triggers when the VIPlus line crosses above the VIMinus line. A bearish signal triggers when the VIMinus line crosses above the VIPlus line.

## Syntax

`Vortex(int period)`

`Vortex(ISeries\<double\> input, int period)`

**Returns VIPlus value**

`Vortex(int period).VIPlus[int barsAgo]`

`Vortex(ISeries\<double\> input, int period).VIPlus[int barsAgo]`

**Returns VIMinus value**

`Vortex(int period).VIMinus[int barsAgo]`

`Vortex(ISeries\<double\> input, int period).VIMinus[int barsAgo]`

## Return Value

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

## Parameters

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

## Examples

```csharp
// Prints the current VIPlus value of a 14 period Vortex
double valueP = Vortex(14).VIPlus[0];
Print("The current Vortex VIPlus value is " + valueP.ToString());

// Prints the current VIMinus value of a 14 period Vortex
double valueM = Vortex(14).VIMinus[0];
Print("The current Vortex VIMinusvalue is " + valueM.ToString());
```