GetAtmStrategyPositionQuantity()

View as Markdown

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

ParameterDescription
atmStrategyIdThe unique identifier for the ATM strategy

Examples

1protected override void OnBarUpdate()
2{
3 // Check if flat
4 if (GetAtmStrategyMarketPosition("idValue") != MarketPosition.Flat)
5 Print("Position size is " + GetAtmStrategyPositionQuantity("idValue").ToString());
6}