Quantity

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Language Reference > Strategy > Position >

Quantity

Previous page Return to chapter overview Next page

Definition

Gets the strategy's current position size.

 

Property Value

An int value representing the position size.

 

Syntax

Position.Quantity
 

Examples

ns

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