GetPositionTotalCost (Reserved Word)

image\trumpet2.gif Disclaimer

Retrieves the future or equity position’s Total Cost for the given symbol in the given account.  No value is returned for Forex positions.

Usage

GetPositionTotalCost(strSymbol, strAccountNumber)

Return

Returns a float value representing the Total Cost.  If no position exists or if the symbol or account is invalid the return value will be zero.

Inputs

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 = GetPositionTotalCost(GetSymbolName, GetAccountID);

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