I've made an algorithm for my local stock exchange (Oslo, Norway). As QC doesn't offer data for these stocks, my algo is downloading the data from Yahoo Finance and adding them using the AddData function:

for ticker in tickers: symbol = self.AddData(Yahoo, ticker, Resolution.Daily).Symbol history = self.History(symbol, 200, Resolution.Daily) stock = StockData(symbol, history, 75, 100) self.stocks[symbol] = stock

"tickers" is just a list of tickers, and "StockData" is an object that stores info about moving averages, rate of change and stuff like that. Yahoo is the function that downloads the data from Yahoo Finance.

This is all working well and the backtests are running fine until the list of tickers exceeds 100. With more than 100 tickers, the backtests are still running without errors, but any ticker exceeding what seems to be a limit of 100, are ignored.

Is there a limit to the number of custom data objects that can be added to the algorithm? Or any other limitation in Lean that causes this behavior? If so, is there a way to work around this?

Author