EntryPrice ();


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


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

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