Hello to everybody,
My goal is to write an EA which react in a particular way once I close a specified deal; i.e. suppose I have just closed a specified deal by the
ticket = PositionGetTicket(i);
print("Opened order ticket no.: "+IntegerToString(ticket)+" closed");
where the index 'i' refers to the selected openend position
Then I want in my OnTradeTransaction(const MqlTradeTransaction& trans, const MqlTradeRequest&
request, const MqlTradeResult& result) detect the deal just closed in order, for example, to detect the gain or the loss.
Advanced thank to everybody will help me.
My immediate goal is only to detect profit or loss position.
Could you explain how exactly to do ?