Closing a trade after a fixed length of time

 
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