You can make dll call or use this function : ExpertRemove(); and in the indi (separated from your ea) just give a condition that if time > x then call Expert remove function.
In this way you will remove ea from chart, which will prevent from opening trades. Unfortunately if you dont have source code, there is not much you can do.
Here is the dll function call that you can use instead of ExpertRemove, before that function you must include this: #include <WinUser32.mqh>
PostMessageA( WindowHandle( Symbol(), Period()), WM_COMMAND, 33050, 0);
But this would remove the expert right. The expert is supposed to maintain already opened orders and decides when to close them.
PostMessageAWindowHandle( Symbol(), Period()), WM_COMMAND, 33050, 0);
Thank you :)
I have an EA that was coded to manage other EAs which has settings to function within certain hours only. The main function of my Ea is that it allows you to turn on and off Autotrade function from Monday to Sunday within certain hours of the day. Each day has a Start time and a End time. The start time turns on autotrade and End time is the time the Ea will start monitoring for any close orders/close trades. If it detects any close trades it then checks for any remaining open positions and if there are no opened positions the Autotrade function is now disabled. This however should only be used for a single ea on a single chart. The Ea is not free also.