Can I schedule trade n bars in the future?

 

I've been asked to code a strategy that always exits from a position after 16 bars. Is there a way to send the exit order to the server at the same time the position is open? Specifically, I need to ensure that the position will exit after 16 bars even if the client workstation crashes or looses network connectivity.

 
I need to ensure that the position will exit after 16 bars even if the client workstation crashes or looses network connectivity. Brokers don't offer time based Stops.