EasyLanguage Function - OOEL Position Information
This OOEL Position Provider function is the easy way to add some new OOEL functionality to your EasyLanguage Strategies or Indicators without having to know or understand any OOEL (Object Oriented Easy Language). All the OOEL code is handled via a stand alone Easy Language function call and we provide all the code your strategy or indicator needs to properly call the Position Provider Function (see screen shot click on top right picture).
This Position Provider Function will returns the following 15 items of information back to your strategy and/or indicator code:
Position_QTY- Returns the number of shares in the current position
Average_Price- Returns Average Price for all positions for current symbol
Open_PL- Returns unrealized profit or loss on the position held
PL_Per_Quantity- Returns the unrealized profit or loss divided by the number of shares or contracts held
Percent_PL- Returns the unrealized profit or loss as a percentage of the initial value
Initial_Margin- Returns the account balance required for entering a position on margin
Maintenance_Margin- Returns the account balance required for maintaining a position on margin
Required_Margin- Returns the margin requirement of the position
Market_Value- Returns the actual market value of the open position
Symbol_Name- Returns Symbol String
Symbol_Type- Returns the category of security 0=Futures 2=Stocks 12=Forex
Total_Cost- Returns the total cost of the open position
Position_Type- Returns trade direction -1=Short 0=Flat 1=Long
Account_ID- Returns the ID for the account
ContractExpireDate- Returns the expiration date for the contract
This TradeStation Add-on Function comes complete with the unlocked code (see screen shot click on top right picture) you will add into your Strategy or Indicator code to properly call the function and have it return the 15 items listed. The Function code file is delivered as locked code that is licensed to your TradeStation CustomerID number.
Important Note:
All OOEL Indicators and Strategies require TradeStation 9.0 or higher to utilize the new OOEL (Object Oriented EasyLanguage).
Take advantage of the new OOEL code without having to know any OOEL programming.
- Login to post comments
