self.minutes_before_opening#
- property Strategy.minutes_before_opening#
Get or set the number of minutes that the strategy will start executing before the market opens. The lifecycle method before_market_opens is executed minutes_before_opening minutes before the market opens. By default, equals to 60 minutes.
- Returns:
The number of minutes before the market opens.
- Return type:
int
Example
>>> # Set the number of minutes before the market opens >>> self.minutes_before_opening = 10
>>> # Set the number of minutes before the market opens to 0 in the initialize method >>> def initialize(self): >>> self.minutes_before_opening = 0