Forum

PIP price per position

Hi, I'm trying to calculate one PIP price for closed position, and then calculate position profit, but results I'm getting always differ from OrderProfit(). Please help me correct my code. By PIP I always mean 1/10000 LOT price (even if there is 5 digits precision), I'm testing it in Strategy Tester

Strategy Tester number of open positions

Hi, I'm using Strategy Tester and OrderSend is returning error (148 - The amount of opened and pending orders has reached the limit set by a broker.). My code is ok, I have variable controlling maximum number of open positions and getting errors when I set it grater than 500. How to override limit

OrderClose, error 129 (INVALID_PRICE) again

Hi, a bit of my code: void CheckPositions(void) { int total_orders = OrdersTotal(); for (int c = total_orders - 1; c >= 0; c--) { if (OrderSelect(c, SELECT_BY_POS) == false) { Alert("Can't select order !"); } else { bool is_pending = (OrderType() != OP_BUY && OrderType() !=