Now I use a method to manipulate real time bar event. (OnRequestUpdate)
In that method I use the for (int i = e.MinIndex; i <= e.MaxIndex; i++) loop
to do stuff and I call OnRender() to update the chart.
In OnRender() I display stuff based on price and I loop through dictionaries.
I sometimes see a flickering of the chart and get the error message : Collection was modified after the enumerator was instantiated...
I do a ForceRefresh() after the for loop because primary bars are always closed when this second bar series is active.
I was wondering if I get this error because new data comes in before the ForceRefresh() finish its job !
How should I approach this whole problem ?
Thank you !
Comment