Disliked{quote} Hi Phylo, I have made the change. But still does not solve. Example, i attach the indicator to EURUSD AUDUSD GBPUSD. There is open orders and take profit for all 3 symbols. But when the alert popup for example AUDUSD, the Take Profit Price shown is for EURUSD. I remove the Take Profit to test the no. of orders open for each symbol, it was correct correct. So the Take Profit Price is definitely not right. Im not a programmer. So i do not know about all this.thanks!Ignored
Steps are:
1. Get all order
2. Select which order you want to process by filter ( if xxx )
3. Process
See documentation:
OrderProfit
Returns profit of the currently selected order.
double OrderProfit();
Returned value
The net profit value (without swaps or commissions) for the selected order. For open orders, it is the current unrealized profit. For closed orders, it is the fixed profit.
Note
The order must be previously selected by the OrderSelect() function.
Example:
if(OrderSelect(10, SELECT_BY_POS)==true)
Print("Profit for the order 10 ",OrderProfit());
else
Print("OrderSelect returned the error of ",GetLastError());