![]() |
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? Kindest regards |
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. |
Ok... extern SecondsToExpire = 60; datetime expiration = 0; start() expiration = TimeCurrent() + SecondsToExpire; |
Thanks will try |
© Forex Factory