EntryPrice ();
Description
Copy link to the section
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
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).