Order_Time_Specified: Invalid expiration type

 

Hi, Where can I get reference notes on how to set the time associated with this Order_Time_Specified or Order_Time_Specified_Day? For example, if I want the order to be valid only for the next bar if trading H4 timeframe, what do I type in the "order expiration time" field. Here is my standartd piece of code: trade.BuyStop(0.10,Ask+100*_Point,_Symbol,0,Ask+300*_Point,ORDER_TIME_SPECIFIED,0,0);

Thank you.

 
MT2209:

Hi, Where can I get reference notes on how to set the time associated with this Order_Time_Specified or Order_Time_Specified_Day? For example, if I want the order to be valid only for the next bar if trading H4 timeframe, what do I type in the "order expiration time" field. Here is my standartd piece of code: trade.BuyStop(0.10,Ask+100*_Point,_Symbol,0,Ask+300*_Point,ORDER_TIME_SPECIFIED,0,0);

Thank you.

Orders close above orders 0.5-0.7 or less.
 
Kantitad Pramchit:
Sorry, I still do not speak English very well.
 
MT2209:

Hi, Where can I get reference notes on how to set the time associated with this Order_Time_Specified or Order_Time_Specified_Day? For example, if I want the order to be valid only for the next bar if trading H4 timeframe, what do I type in the "order expiration time" field. Here is my standartd piece of code: trade.BuyStop(0.10,Ask+100*_Point,_Symbol,0,Ask+300*_Point,ORDER_TIME_SPECIFIED,0,0);

Thank you.

https://www.mql5.com/en/code/20751
Reason: