self.sleep#
- lumibot.strategies.strategy.Strategy.sleep(self, sleeptime)#
Sleep for sleeptime seconds.
Use to pause the execution of the program. This should be used instead of time.sleep within the strategy.
- Parameters:
sleeptime (float) – Time in seconds the program will be paused.
- Return type:
None
Example
>>> # Sleep for 5 seconds >>> self.sleep(5)