EasyLanguage Object Reference
The PositionsProvider allows access to updated information about positions held for specified symbols and order types from a list of TradeStation accounts. This information is similar to that found on the Positions tab of the TradeManager. The Position class describes the properties available for a specific position.
Typically, you will use the Toolbox to add a component to your EasyLanguage document. Click and drag the name PositionsProvider into your document from the Toolbox. By default, the name of the provider appears in the component tray at the bottom of your document followed by a number (to help identify multiple instances of the component).
Open the Properties editor and locate the Accounts, Symbols, or Types properties under "Filters". By default, these fields are blank so all position objects will be available. A comma delimited list of account numbers, symbols, or types (eg. "SIM12345, SIM67890") specifies that only those listed are to be included in the Positions collection queried by the PositionsProvider.
To reference property values for a specific position object in EasyLanguage code, use PositionProvider1 followed by a 'dot operator', and the collection name: Position[parameter] followed by a 'dot operator' and the position property name. Parameter can be a numeric index (zero-based) that represents a Position object within the positions provider collection or a string containing a specific symbol and a string containing the AccountID. Available positions properties will appear in the autocomplete list as soon as you type the 'dot' after position[parameter]. properties are also listed under Position class in the dictionary and help.
Value1=PositionsProvider1.Position[0].MarketValue; // gets the actual market value for the first position [0] in the collection.
The provider can only access positions that are associated with the current TradeStation logon.
For general information about providers, refer to Provider Classes.
Namespace: tsdata.trading