I have a small manual universe and I would like my code to run for any of the securities within it, but my for loop is not working. Help please.

 

 

for security in self.ActiveSecurities:
           if self.maxPrice1.Current.Value <= entryPrice:
               self.SetHoldings(security, 0.2)
               self.stopMarketOrder(security, -1.0, stopLossPercent)
               self.limitOrder(security, -1.0, takeProfitPercent)

 


Runtime Error: Trying to dynamically access a method that does not exist throws a TypeError exception. To prevent the exception, ensure each parameter type matches those required by the 'int'>) method. Please checkout the API documentation.
at OnData
self.SetHoldings(security in main.py: line 51 (Open Stacktrace)