Code for last OrderTicket in TP

 

Can someone help me how the correct Code is, to get the OrderCloseTime from the last closed Order with TakeProfit?
 
  1. Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
              No free help 2017.04.21

    Or pay someone. Top of every page is the link Freelance.
              Hiring to write script - General - MQL5 programming forum 2018.05.12

  2. Go through history, filter by symbol, magic number, TP vs. SL, and remember the last OCT.

    1. Do not assume history has only closed orders.
                OrderType() == 6, 7 in the history pool? - MQL4 programming forum 2017.11.30

    2. Do not assume history is ordered by date, it's not.
                Could EA Really Live By Order_History Alone? (ubzen) - MQL4 programming forum 2012.04.21
                Taking the last profit and storing it in a variable | MQL4 - MQL4 programming forum #3 2020.06.08