EntryPrice

EntryPrice ();

Description
Copy link to the section

Returns the price of the simulated entry order. For several entry orders in the same direction as the current simulated position the function returns the average price for all of them.

Example
Copy link to the section

AddOrder(OrderType.SELL_TO_CLOSE, close > EntryPrice() + 3 or close < EntryPrice() - 9);

Adds a simulated Sell order for closing a simulated long position when the Close price is either greater than the entry price by 3 (for taking profits) or less by 9 (for cutting losses).

You may also like
Watchlist
Watchlists are one of the key thinkorswim® features. A watchlist is a collection of symbols with ...
GetAggregationPeriod
The GetAggregationPeriod function returns the current aggregation period in milliseconds for ...
GetYield
Returns the yield of the current stock or the underlying symbol for the current option.