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

# Darvas

## Description

A trading strategy that was developed in 1956 by former ballroom dancer Nicolas Darvas. Darvas' trading technique involved buying into stocks that were trading at new 52-week highs with correspondingly high volumes.

... Courtesy of [Investopedia](http://www.investopedia.com/terms/d/darvasboxtheory.asp)

## Syntax

`Darvas()`

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

**Returns the upper value**

`Darvas().Upper[int barsAgo]`

`Darvas(ISeries\<double\> input).Upper[int barsAgo]`

**Returns the lower value**

`Darvas().Lower[int barsAgo]`

`Darvas(ISeries\<double\> input).Lower[int barsAgo]`

## Return Value

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

## Parameters

* input
* Indicator source data ([Series\<T>](/developer/desktop-sdk/references/common/iseriest/seriest))

## Examples

```csharp
// Prints the current upper Darvas value
double value = Darvas().Upper[0];
Print("The current upper Darvas 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.