Add A Stopwatch To Your Algo
Use the Stopwatch block to time an order action such as delaying your profit order by 5 seconds. #TTtips
When a discrete event message enters its discrete input port, the Stopwatch block evaluates its StopTime formula (using the Formula Builder) to determine the stop time in milliseconds. After the specified stop time, the block sends a discrete event message through its output port. The Stopwatch block must be reset with a new incoming discrete event message to repeat its operation.
Example The Stopwatch block is triggered when it receives a discrete event message from a fill. The Stopwatch block formula is set to 1000, which causes the block to wait one second before forwarding the discrete event message to the DiscreteOrder block to submit the exit order.