I have an MQL4 EA that is a breakout system based on a time range. I want to optimize the entry. I order to do this I need to open a trade for a specific length of time, say 60 minutes. I am having a hard time finding a way to close a trade after it has been open for this fixed length of time. For example if a trade is opened at 8:12 AM and I want it to run for 60 minutes I need to close it at 9:12 AM. Or if a trade opens at 12:31 PM and I need to close it at 1:31PM. I would be doing this for every trade for say 6 months, or a year. I know the logic I just don't know the syntax. Any help would be appreciated. Thanks.....Mike
- MT4 EA that closes a trade (open or pending) after a certain period of time
- Backtesting/Optimization
- Scripts: Pending orders DOWN

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