What would be a reason for Series<T> stored data to wrap when retrieved with GetValueAt()?

I store data in Series T for all candles, 5546 in total. I can retrieve correct data from the series after storing it (using [0] index) within onbarupdate but in onrender GetValueAt() returns only last 273 values. When onrender is referencing older candles, GetValueAt() wraps. I have Maximum bars look back set to Infinite if that matters.

After few wasted hours I figured it out. I’ll leave it here if anyone else runs into trouble with this:
1.MaximumBarsLookBack has to be defined in code, not just in UI properties.
2.MaximumbarsLookBack has to precede object creation.

Maybe this is obvious to real programmers but neither AI could help me with that.

1 Like