GetPositionSymbol (Reserved Word)

image\trumpet2.gif Disclaimer

Identifies the symbol associated with the Position location number in an alphabetically sorted list of account positions maintained by the TradeManager .  This function can be used with GetNumPositions to enumerate available positions.

  Adding or removing positions will change the sorted position list and may change the index value of existing positions.

Usage

GetPositionSymbol(strAccountNumber, iPositionId)

Return

Returns a string identifying the symbol associated with  iPositionId location in a list of open positions.  Returns an empty string for an invalid  iPositionId.

Inputs

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.
iPositionId is an integer number with a value between 1 and the number returned by GetNumPositions.

Example

vars: str("");

str = GetPositionSymbol(GetAccountID ,1);

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