OnTradeTransaction

 
How can I use this to check the profits of a position that is about to be closed by tp, in case the broker widens his spread?
 
mr_stoploss:
How can I use this to check the profits of a position that is about to be closed by tp, in case the broker widens his spread?
If the position is "about to be closed", it's not closed, so there is no transaction. You probably can't use this event handler for what you are trying to do.
Reason: