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

# GetAtmStrategyPositionQuantity()

## Definition

Gets the current position quantity 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

An **int** value representing the quantity.

## Syntax

`GetAtmStrategyPositionQuantity(string atmStrategyId)`

## Parameters

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

## Examples

```csharp
protected override void OnBarUpdate()
{
     // Check if flat
     if (GetAtmStrategyMarketPosition("idValue") != MarketPosition.Flat)
         Print("Position size is " + GetAtmStrategyPositionQuantity("idValue").ToString());
}
```