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

# GetAsk()

## Definition

Returns the ask price value at a selected absolute bar index value.

* This method does NOT return the current real-time asking price, but rather the historical / real-time asking price at the desired index. For obtaining the current real-time asking price, please use **GetCurrentAsk**().
* This method returns expected values when 1 tick bid / ask stamped data is used and available from **your provider**.

## Method Return Value

A **double** value that represents the asking price at the desired bar index.

## Syntax

`Bars.GetAsk(int index)`

## Parameters

| Parameter | Description                       |
| --------- | --------------------------------- |
| **index** | The absolute bar index value used |

## Examples

```csharp
protected override void OnBarUpdate()
{
    // If the Highs of the two most recent bars are falling, place a long stop market order 
    // at the Ask price 
    if (High[0] < High[1] && High[1] < High[2])
    {
        EnterLongStopMarket(Bars.GetAsk(CurrentBar));
    }
}
```