Action after stops triggered

 
I've been looking for a while for a solution, but I just can't find anything...

I take a time when I close an order and this all works fine when the order is closed by the EA. But when the order is closed by either a Stop Loss or Take Profit, it looses the order and I can't get into the code that sets the time stamp.(It won't draw the closing arrow either). I guess I could get into counting number of open orders and check for changes and action on the changes but I was wondering if there is a simpler method around this?

As ever, grateful for assistance.
V
 

V
It hasnt lost the order, it has merely moved to history
See https://www.mql5.com/en/search
You can poll the history every n ticks or miniutes and if an order has closed since the last poll, you do your timestamp thing
FWIW
-BB-

 
Thanks BB. That helps.... Yeah, "lost" was maybe a bit over dramatic :)