The trading system based on SSL_NRTR indicator signals with the possibility to set a fixed position holding time. The signal is formed when a bar is closing if the indicator changes its color from a non-trend to a trend one or from a trend one to an opposite trend one. Once position holding time exceeds a preset fixed limit, the position will be closed immediately:
input bool TimeTrade=true; //Enabling position exit by time input uint nTime=3840; //Open position holding time in minutes
For the generated EA to operate correctly, the compiled SSL_NRTR.ex5 indicator file should be in the <terminal_data_directory>\MQL5\Indicators folder.
Default Expert Advisor's input parameters have been used during tests shown below.

Fig. 1. Examples of trades on the chart
Testing results for GBPJPY H4 over the year 2017:

Fig. 2. Test results chart