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

# GetAtmStrategyPositionAveragePrice()

## Definition

Gets the current position's average price of the specified ATM Strategy.

Changes to positions will not be reflected till at least the next **OnBarUpdate()** event after an order fill.

## Method Return Value

A **double** value representing the average price.

## Syntax

`GetAtmStrategyPositionAveragePrice(string atmStrategyId)`

## Parameters

| Parameter         | Description                                |
| ----------------- | ------------------------------------------ |
| **atmStrategyId** | The unique identifier for the ATM strategy |

## Examples

```csharp
protected override void OnBarUpdate()
{
     // Check if flat
     if (GetAtmStrategyMarketPosition("id") != MarketPosition.Flat)
         Print("Average price is " + GetAtmStrategyPositionAveragePrice("id").ToString());
}
```