My Indicator draws a rectangle around every 100 bars, when the counter resets, the box shifts to the new set of bars. I'm trying to plot historically OnRender... With regular drawing tools if we add +CurrentBar to the title it would repeat the drawing tool historically. How could this be done OnRender?
My research has lead my to add something like:
for (int index = 0; index <= ChartBars.Count; index+=100)
"Error on calling 'OnRender' method on bar 3529492:Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Does that mean that since cacheDictionary was cleared, it can no longer access that data? if so, how can I fix that?
Here is the code I'm using OnBarUpdate:
if (CurrentBars[0] >= savedBar + 100) { savedBar = CurrentBars[0]; cacheDictionary.Clear(); }
Comment