Download MetaTrader 5

unable to get time of deal execution in milliseconds within the strategy tester

To add comments, please log in or register
zifu wang
637
zifu wang  

I tried to get time of deal execution in milliseconds in tester mode, the return always is 0. but the HistoryDealGetInteger(last_deal,DEAL_TIME) works fine.

      //--- time of deal execution in milliseconds since 01.01.1970
      long deal_time_msc=HistoryDealGetInteger(last_deal,DEAL_TIME_MSC);
      PrintFormat("Deal #%d DEAL_TIME_MSC=%i64 => %s",last_deal,deal_time_msc,TimeToString(deal_time_msc/1000));
Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Deal Properties
Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Deal Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Trade Constants / Deal Properties - Documentation on MQL5
To add comments, please log in or register