NT8 bug with stock Renko bars while using multiple series on same chart?

Hello.

I’ve noticed what seems to be a bug in NT itself with collisions that occur when loading Renko bars of different sizes on the same chart(one primary, one secondary) series.

This works fine w/no data feed connected and the chart is built w/historical data.

I noticed this issue as I built my own renko bar, modeled off the stock NT renko bar, and realized this issue existed in the standard one also.


When there is no feed connected, workspace open, and then connecting to a data feed, the bars begin stacking on top of one another.


I can temporarily repair this error by opening up the chart settings, switching the bar sizes to a different value, and then the chart will seemingly repair itself. Although any cached data that was built incorrectly will be built into the data. See image below:
[img2]


However, after the chart runs a while, and this happens randomly, the error exceptions below will pop up. That and one or both of the series will again begin misprinting or omitting bars.
[img3]


I think the issue is that the multi-series use a merged x-axis computed during the workspace’s start, and that layout goes stale during live ticks because each series has a timestamp that gets rewritten on each tick in UpdateBar(). Over time, the cached layout and live timestamps drift apart, and and the render loop that draws the chart style against a collection that isn’t there, causing the IndexOutOfRange errors.

To put it more simply, consecutive bars can be emitted w/identical timestamps during live ticks. W/one series, this is no problem. But w/two series, the merged x-axis tries to index via these dupe timestamps and causes the out-of-range index lookups, which is what I think leads to the error?

I’m wondering if this is a known NT bug w/NTs renko bars, and if there is a way around this?

I could only attach 1 image in my opening post, so I’ll include the other 2 where those [img] placeholders where.

img2 :backhand_index_pointing_down:

img3 :backhand_index_pointing_down:

I could be wrong…
But I thought maybe the delayed data might be the problem. I got live data, and my bar series w/a secondary series seems to work fine :person_shrugging:

This is a difficult question because when we use Renko charts for indicators, they usually plot like this, which looks very strange. Have you tried another Renko chart from a different code?I also faced this problem when evaluating NinjaTrader, even with charts containing different data series. It’s a programming issue if there are two data series on the same chart.

Howdy,

I got live data, and my bar series w/a secondary series seems to work fine

Actually, I don’t know what was happening at the time, and maybe I didn’t explain it well in my post above, but everything works fine now.

I’m not sure what was happening? Either I just wasn’t paying attention, or it was due to using the free delayed data feed?

But once I connected to LIVE data, everything worked fine. I explained above, that I suspected the bar series I built just struggled w/the DELAYED timestamps, attempting to plot it on a real time chart or something? I.e., some internal collisions with time.now() and timestamps the bars were receiving in real time? This was happening w/the stock NT renko bars and the custom renko bars I built.

As the historical bars would build fine, but streaming it live would break everything.

But all good now. :+1:

1 Like

When I encounter problems in my code and need to review and find the specific issue, I sometimes turn to claude.ai, and it always points me to the correct solution.

1 Like

You’re using a 3rd party bar type, so it might not have been coded correctly, which could be causing all kinds of issues. I’ve gone through this phase as well and it 9 out of 10 times it was a poorly coded tool. At any rate, as Andrew says you’ve gotta dig into the cause with AI.

Suggestion, screenshot your compilation error and paste it in to Claude or ChatGPT.

Maybe I’m still not explaining this well?

This was on the STANDARD NT renko bar type.

I noticed this problem on MY bar type initially, then I wanted to see if the problem was MY bar type, or some other issue.

I loaded up the STANDARD NT renko bars, and they too had the same problem.

The images I attached several posts above are showing the standard NT renko bars(the gray bars).

As I mentioned before, I think the problem was a timestamp collision using NT’s FREE, delayed data feed.

Imagine if you stream data that is 10 minutes delayed. When you attempt to push that LIVE, to a time-axis that expects to receive data w/a timestamp of time.now(), and it is delayed by 10 minutes, it causes a collision on the x-axis, and the platform doesn’t know where to put that data.

I think this is the case b/c once I used a LIVE data feed(not delayed), everything worked as expected. Additionally, the historical bars would build fine, it was just the LIVE data.

TLDR: It wasn’t the 3rd party bar type, it was the stock NT bars. The issue was not the bar-type, it was using a delayed data feed that caused a timestamp collision. Everything works as expected when streaming a Non-delayed data feed.