Add code to close all orders at a specific hour of the day

 

Hello. I need to modify an EA that makes simple (orders one at a time) to be able to close all orders made by it at a pre-defined time (23h50). Any idea how to it? Maybe something like this? https://www.mql5.com/en/forum/139654

ps: I only started with mql5 two days ago, tried to implement it, but failed beautifully.

Thanks

Loops and Closing or Deleting Orders
Loops and Closing or Deleting Orders
  • 2012.05.24
  • www.mql5.com
This is one of the most common errors I see, probably due in part to the likes of garbage such as Expert Advisor Builder...
Files:
HMA_EA.mq5  11 kb
Reason: