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

# PositionAccount

## Definition

Represents position related information that pertains to real-world account (live or simulation).

Tips:

* For multi-instrument scripts, please see **PositionsAccount** object which holds an array of all instrument positions managed by the strategy's account.
* For a Strategy Position, please see **Position**.

## Methods and Properties

| Property                      | Description                                                                                                                                                     |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Account**                   | An **Account** object which corresponds to the position                                                                                                         |
| **AveragePrice**              | Gets the average entry price of the account position                                                                                                            |
| **GetUnrealizedProfitLoss()** | Gets the unrealized PnL for the account                                                                                                                         |
| **Instrument**                | An **Instrument** value representing the instrument of an order                                                                                                 |
| **MarketPosition**            | Gets the current market position of the account<br />• Possible values:<br />**MarketPosition.Flat**<br />**MarketPosition.Long**<br />**MarketPosition.Short** |
| **Quantity**                  | Gets the current account position size                                                                                                                          |
| **ToString()**                | A string representation of an account position                                                                                                                  |

## Examples

```csharp
protected override void OnBarUpdate()
{
    // Print out the average entry price
    Print("The average entry price is " + PositionAccount.AveragePrice);
}
```