[MQL4 to MQL5] Replacemet for OrderOpenTime()? (solved)

 

Good afternoon,

I am porting a simple Ea which closes positions after some time if a condition is met, and I don't seem to find replacement for OrderOpenTime() for MQL5.

I browsed the forum and this article without success: https://www.mql5.com/en/articles/81.

Could you please point me in the right direction?

Thanks!



Migrating from MQL4 to MQL5
Migrating from MQL4 to MQL5
  • 2010.05.17
  • Sergey Pavlov
  • www.mql5.com
This article is a quick guide to MQL4 language functions, it will help you to migrate your programs from MQL4 to MQL5. For each MQL4 function (except trading functions) the description and MQL5 implementation are presented, it allows you to reduce the conversion time significantly. For convenience, the MQL4 functions are divided into groups, similar to MQL4 Reference.
 
PzTrading:

Good afternoon,

I am porting a simple Ea which closes positions after some time if a condition is met, and I don't seem to find replacement for OrderOpenTime() for MQL5.

I browsed the forum and this article without success: https://www.mql5.com/en/articles/81.

Could you please point me in the right direction?

Thanks!



Never mind, I just did!

OrderGetInteger(ORDER_TIME_SETUP);
Reason: