foreach (var data in MyDataDictionary.Values) { if (data.OpenTime >= Bars.GetTime(ChartBars.FromIndex) && data.CloseTime <= Bars.GetTime(ChartBars.ToIndex))
It has render lines and rectangles after that. It works fine when not using real-time data, only displaying
the objects when they're within the chart time,
but as soon as I turn on real-time data, they all disappear.
I do have a secondary day chart on the indicator.
I have a theory that it's disappearing because of the daily data series,
because
Print("FromIndex Time: " + Bars.GetTime(ChartBars.FromIndex));
provides lots of different times when not connected to real-time data, like:
FromIndex Time: 2/01/2024 8:50:00 am
FromIndex Time: 2/01/2024 8:55:00 am
FromIndex Time: 2/01/2024 9:05:00 am
FromIndex Time: 2/01/2024 9:10:00 am
FromIndex Time: 2/01/2024 9:20:00 am
FromIndex Time: 2/01/2024 9:25:00 am
FromIndex Time: 2/01/2024 9:30:00 am
FromIndex Time: 2/01/2024 9:35:00 am
FromIndex Time: 2/01/2024 9:40:00 am
but when connected to real-time, it only gives
FromIndex Time: 28/12/2023 5:00:00 pm
FromIndex Time: 28/12/2023 5:00:00 pm
FromIndex Time: 28/12/2023 5:00:00 pm
FromIndex Time: 28/12/2023 5:00:00 pm
FromIndex Time: 28/12/2023 5:00:00 pm
what's the correct code to add so it ignores the daily secondary data series?
Thank you!
Comment