def on_closed_market_iteration =================================== .. meta:: :description: Run scheduled off-hours data preparation in on_closed_market_iteration without submitting live orders while the market is closed. This lifecycle method runs during explicitly scheduled closed-market preparation runs (for example, pre-market research or overnight indicator/evidence staging). Order submission, cancellation, and modification APIs are blocked during closed-market preparation runs so off-hours data preparation never submits unintended trades. .. code-block:: python class MyStrategy(Strategy): def on_closed_market_iteration(self): self.vars.overnight_notes = "Prepared before market open" Reference ---------- .. autofunction:: lumibot.strategies.strategy.Strategy.on_closed_market_iteration