Runtime Error: 'list' object is not callable  at buy_stock    if len([x.Symbol for x in self.Portfolio.Values() if x.Invested]) >= self.max_positions:                              ^^^^^^^^^^^^^^^^^^^^^^^ in main.py: line 161  at OnData    self.buy_stock(symbol, current_price) in main.py: line 81

def buy_stock(self, symbol, current_price):
        """
        Execute the buy order for the stock that reached a new 52-week high.
        """
         # Only buy if 50% or more of the existing positions are profitable
        # if not self.is_profitable_to_buy():
        #     self.Debug("Not enough profitable positions to buy a new one.")
        #     return

        # Ensure we have fewer than 10 unique symbols in the portfolio
        if len([x.Symbol for x in self.Portfolio.Values() if x.Invested]) >= self.max_positions:
            self.Debug(f"Cannot buy {symbol}: Maximum number of unique symbols ({self.max_positions}) reached.")
            return