this is my ea I need to add delete pending order after,,,, Minutes
like I min or 2 min or mor
Files:
khaledellord.mq4
10 kb
Try the follow:
The rest you can add by yourself..
int Minutes_2delete = 1; if (OrderType()>1&&TimeCurrent()-OrderOpenTime()>Minutes_2delete*60) OrderDelete(OrderTicket());
The rest you can add by yourself..
James
Why don't you just use Expiration in the OrderSend:
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) |
With expiration = TimeCurrent()+60*minutes. Then the broker will delete it when the order expires.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I need expert delete pending order after,,,, Minutes