A good way to approach this would be to use delayed signals. See
https://aleratrading.com/forum/showthread.php?tid=413
It would not be automated like the target and loss stops in the strategy tab, but it would essentially function as a time stop.
For example, suppose you want to open AAPL and close it after 5 days. Then you can place the signal
LONG AAPL 100 SHARES LMT 150
CLOSE AAPL AFTER 20220114 09:00:00 EST
This would automatically place a CLOSE order on January 14th and close your AAPL position if it's open, or cancel the limit order if it's still in the market.
This will not work if you attempt to place orders every day for AAPL when you already own the position, since the delayed order will be constantly updated. Instead, you would need to only place orders for AAPL when you don't own it -- this would require you to check your portfolio through the Alera API.
Another solution would be to use the Alera API to get the "days in market" of a position and close it if that value is larger than 5.
Using the /strategies/<id>/portfolio/json you can get this information. See
https://aleratrading.com/forum/showthread.php?tid=89
It's not too difficult to write a Python script to do this
We could also add a feature for custom timed exits in signals. We do something similar for custom stop/target signals
https://aleratrading.com/forum/showthread.php?tid=404, so it should be possible to attach a close datetime + a limit price to close at to orders. We will consider adding this feature in the future.