Order Expire in datetime MQL4

 

Helle,

 

in older days, the order expire was a function of Seconds,

 

now it use the datetime and this is a miracle for me since i use MQL4.

can someone help me, how do program on a pending order, that the expiration is after 30 minutes?

 

OrderSend(Symbol(),OP_SELLSTOP,Lots,Price_Sell,Slip,SL,TP,Text,MN,EXPIRATION??????,Red);


 

amando 

  

 PS

@admin, plese do not post this link here, i know you will do it, but i dont understand the crap here

https://docs.mql4.com/basis/types/integer/datetime

Datetime Type - Integer Types - Data Types - Language Basics - MQL4 Reference
Datetime Type - Integer Types - Data Types - Language Basics - MQL4 Reference
  • docs.mql4.com
Datetime Type - Integer Types - Data Types - Language Basics - MQL4 Reference
 
This is exactly as docs says - expiration time in datetime type. You don't need to bother that it's internally stored as number of seconds passed since epoch. You can use any datetime related functions or simply add seconds to current time.
OrderSend - Trade Functions - MQL4 Reference
OrderSend - Trade Functions - MQL4 Reference
  • docs.mql4.com
OrderSend - Trade Functions - MQL4 Reference
 
amando:
...

can someone help me, how do program on a pending order, that the expiration is after 30 minutes?



OrderSend(Symbol(),OP_SELLSTOP,Lots,Price_Sell,Slip,SL,TP,Text,MN,TimeCurrent()+30*60,Red);
 

Thanks

 
Stanislav Korotky:
This is exactly as docs says - expiration time in datetime type. You don't need to bother that it's internally stored as number of seconds passed since epoch. You can use any datetime related functions or simply add seconds to current time.

This was the missing link document ;-)

thanks a lot

 
Alain Verleyen #:

OrderSend(Symbol(),OP_SELLSTOP,Lots,Price_Sell,Slip,SL,TP,Text,MN,TimeCurrent()+30*60,Red);
tanx alot