Quantity

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Language Reference > Strategy > PositionAccount >

Quantity

Previous page Return to chapter overview Next page

Definition

Gets the current account's position size.

 

Property Value

An int value representing the account's position size.

 

Syntax

PositionAccount.Quantity
 

Examples

ns


protected override void OnBarUpdate()
{
    // Prints out the current market position
    Print(PositionAccount.MarketPosition.ToString() + " " + PositionAccount.Quantity.ToString());
}