NinjaScript > Language Reference > Strategy >
Position
Definition
The Position object holds data related to a currently held position by a strategy.
Methods and Properties
AvgPrice
Gets the average entry price of the strategy position
GetProfitLoss()
Gets the unrealized PnL
MarketPosition
Gets the current market position
Quantity
Gets the current position size
Examples
protected override void OnBarUpdate() { // Print out the average entry price
Print("The average entry price is " + Position.AvgPrice); }