Close pending order in X time
Hi guys how can i make an order expire in X time?
Let's say my expert has a number of seconds
extern int Seconds = 60;
then i want the pending order of this EA to expire 60 seconds after they were opened, how can i do this in mt4?
int OrderSend( string symbol, int cmd, double volume, double price, int slippage, double stoploss, double takeprofit, string comment=NULL, int magic=0, datetime expiration=0, color arrow_color=CLR_NONE)
Thanks, but i'm looking for a way to the order expire in seconds not in datetime format.
extern SecondsToExpire = 60;
datetime expiration = 0;
expiration = TimeCurrent() + SecondsToExpire;
Thanks will try
© Forex Factory