Hide navigation sidebar
Hide table of contents sidebar
Toggle table of contents sidebar

# 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.

  Returns

  Return type

    None

  Example

      >>> # Sleep for 5 seconds
      >>> self.sleep(5)