My universe selection runs 1 minute after market open via

AddUniverseSelection(new ScheduledUniverseSelectionModel( DateRules.Every(DayOfWeek.Monday, DayOfWeek.Tuesday, DayOfWeek.Wednesday, DayOfWeek.Thursday, DayOfWeek.Friday), TimeRules.AfterMarketOpen("TSLA",1), SelectSymbols // selection function in algorithm. ));

and returns 10 equities.

The following OnSecuritiesChanged method is then executed.

public override void OnSecuritiesChanged(SecurityChanges changes) { var spy = QuantConnect.Symbol.Create("SPY", SecurityType.Equity, Market.USA); _changes = changes; //Debug($"{changes}"); var addedSymbols = changes.AddedSecurities; var removedSymbols = changes.RemovedSecurities; foreach (var c in addedSymbols){ if (c.Symbol == spy) break; AddEquity(c.Symbol, Resolution.Minute); //if(!c.HasData) { if(! Securities[c.Symbol].HasData) { Debug("no data:"+c.Symbol); nodata++; } else { Debug("in:"+c.Symbol); SetHoldings(c.Symbol, 0.05m); data++; } if(nodata % 25 == 0 || data % 25 == 0){ Debug("d/nd/ni: "+data+"/"+nodata+"/"+notinvested); } } foreach (var c in removedSymbols){ if (c.Invested){ Debug("out: "+c.Symbol); Liquidate(c.Symbol); } else { Debug("was not invested !"); notinvested++; } } }

If I run this from 2021/1/1 I get the following information:

- Data was only available in 57 cases (1 minute after market open)
- The nodata counter is at 86
- The notinvested counter is at 39, which I do not understand. The SetHoldings method is only called when data is available.

What am I doing wrong here ?