GetPositionQuantity (Reserved Word)

image\trumpet2.gif Disclaimer

Identifies the net quantity and side of the equity or futures position for the given symbol in the given account.  For Forex, the number of lots is returned.

Usage

GetPositionQuantity(strSymbol, strAccountNumber)

Return  

Returns an integer identifying the net position quantity for the given symbol and account.  A negative value indicates the position is net short.  A positive value indicates the position is net long.  Zero indicates the position is net flat or the symbol or account is invalid.

Input 

strSymbol is a string that identifies the symbol. GetSymbolName returns the Symbol of the chart as the parameter needed here.

strAccountNumber is a string representation of the account to check for the position in. GetAccountID returns the Account parameter needed here, or you can specify it manually.

Example

Value1 = GetPositionQuantity(GetSymbolName, GetAccountID)

  This reserved word uses processor intensive TradeManager calls that may adversely impact the performance of TradeStation and other applications on your computer.