Hi, i am trying to create a strategy that looks at same day SPX options and am having trouble getting the filtering to work. 

I start by adding the option options symbols and setting up the filtering:

option = self.add_index_option(self.spx, 'SPXW', Resolution.HOUR) #spxW is the tradeable on same day options
option.SetFilter(lambda option_filter_universe : option_filter_universe.IncludeWeeklys().Strikes(-5, 5).Expiration(0, 0))
self.spxOption = option.symbol

And then when i get the data i am looping through each contract and logging some data to check what contracts i got: 

def OnData(self, slice: Slice) -> None:
      if self.is_market_open(self.spxOption) and self.spx in slice.bars:
            SPXChain = slice.option_chains.get(self.spxOption)
            SPXTradeBar = slice.bars[self.spx]
            if SPXChain:
                for contract in SPXChain:
                	self.debug(f"{contract.symbol} | time: {slice.time} | closeTime: {market_close_time} | type:  {type} | strike: {contract.Strike} | market: {SPXTradeBar.close} | lastUnder: {contract.UnderlyingLastPrice})

My expectation is that i would get 10 total contracts per time period with 5 under the current clossest to market strike and 5 over it. 

However when i look through the logs i am getting the below: 

ryan_klingert_1728918471.jpg

As you can see, at this time the current underlying for spx is $4734.75. Since the strikes are in $5 increments the closest strike would be $4735. So i would expect to get 5 below that and 5 above but for some reason i am getting strikes starting at $4750 and going up. 

 

Any help would be appricated.