onTradeTransaction not triggered

 

Calling positionClose from the CTrade class doesn't trigger the onTradeTransaction  event.

Is there a different way I should close a position?

 
Alon D :

Calling positionClose from the CTrade class doesn't trigger the  onTradeTransaction   event.

Is there a different way I should close a position?

There are two reasons: 1. The position was not closed (for example, a requote was received) 2. You do not know how to handle OnTradeTransaction.

 

Try to use my TradeTransaction class


https://www.mql5.com/en/code/24901

TradeTransaction Class
TradeTransaction Class
  • www.mql5.com
When performing some definite actions on a trade account, its state changes. Such actions include: Sending a trade request from any MQL5 application in the client terminal using OrderSend and OrderSendAsync functions and its further execution; Sending a trade request via the terminal graphical interface and its further execution; activation of...
Reason: