Hi guys,
Do you know how to set expiration date on a pending order in an EA.
OrderSend(Symbol(),OP_SELLLIMIT,1,xxxx,1,xxxx+20*Point,xxxx-20*Point,NULL,0,(This is where the expiration date supposed to be),CLR_NONE);
The problem is I don't really know how to put the datetime variable here.
The case is that all order in my EA is opened at 8:00 (pending order), and I want the order to be expired if it is not executed by 12:00. How can I set the expiration date in the code?
Do you know how to set expiration date on a pending order in an EA.
OrderSend(Symbol(),OP_SELLLIMIT,1,xxxx,1,xxxx+20*Point,xxxx-20*Point,NULL,0,(This is where the expiration date supposed to be),CLR_NONE);
The problem is I don't really know how to put the datetime variable here.
The case is that all order in my EA is opened at 8:00 (pending order), and I want the order to be expired if it is not executed by 12:00. How can I set the expiration date in the code?
Be young. But don't be foolish. Study history! - Curtis Faith