recommendations has improved CPU and memory usage significantly.
Today, I'm running the version that uses a for loop (ScanMode 2 in my earlier post). It threw the "Collection was modified error." How is that possible? Must I revert to using .ToList()?
5. Before scanning cdict_dictionaries[i_barkey]
Collection was modified; enumeration operation may not execute.
Source: mscorlib
StackTrace: at System.Collections.Generic.Dictionary`2.Enumerator .MoveNext()
at System.Linq.Enumerable.ElementAt[TSource](IEnumerable`1 source, Int32 index)
at NinjaTrader.NinjaScript.Indicators.gws.gLiquidity. OnRender(ChartControl chartControl, ChartScale chartScale)
TargetSite: Boolean MoveNext()
ChartBars: (Base 1-Tick) SecondBarsType (Second: 6/4) TickReplay OnPriceChange
Comment