Trades time expiry

 

Hi, anyone have or know how i can get a simple time expiry ea or indicator?


All i need it to do is close trades that i have open manually at a specific time and date..

Like for example if i open a trade manually at 3:40pm but i want it closed automaticly at 7:00pm

Thanks

 
Sebastien Simard:

Hi, anyone have or know how i can get a simple time expiry ea or indicator?

All i need it to do is close trades that i have open manually at a specific time and date..

Like for example if i open a trade manually at 3:40pm but i want it closed automaticly at 7:00pm

Thanks

try this, or else try freelance.

bool ExpiredOrder(int magic, int bar, ENUM_TIMEFRAMES timeframe) {
   bool x = false;
   if(Count.OrderAll(magic)>0) {
      datetime ot = Property.openTime(magic);
      if(TimeNow>=ot+bar*PeriodSeconds(timeframe)) x = true;
   }
   return x;
}
Trading applications for MetaTrader 5 to order
Trading applications for MetaTrader 5 to order
  • www.mql5.com
Hi, I am looking for EA that copies trade from Other MT4 account. We have investor password for that account. If you have any EA please contact us we shall discuss regarding this Modification of Signal EA MT5 ( https://www.mql5.com/en/market/product/43820 , I have the source code and authorized by publisher to modify it by a coder). To add in...
 
Hi thanks, how do i use that?
Reason: