Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Opening charts often fails to load all data, showing gaps
Collapse
X
-
I don't want to interfere too much, but if you load a secondary bar series via an indicator, the problem may have been caused by the indicator code. When the primary bar series is processed, the last bar of the secondary bar series may not yet have been processed. This is due to the way NinjaTrader processes the primary and secondary bars.Originally posted by adamus View Post2013-10-15 23:00 is the 50th bar in the bars collection. The 49th bar is also yesterday, but 00:00. So Ninja loaded 49 bars OK, but for reasons unknown, stopped at 2013-10-15 00:00.
This was the secondary time-frame in an indicator on a 3-min chart of the same instrument.
Comment
-
Originally posted by NinjaTrader_Bertrand View Postadamus, do you see any of the pacing violation messages from IB in the log that Harry mentioned in his replies? Are there any other errors in the log or trace? So the issue exists only in the internally loaded series via the Add() method for you?
Hi Bertrand,
no, there were no pacing violations. I am very familiar with pacing violations so I can say that definitively.
You are correct that this issue only exists in the dataseries added in the Initialization Add() routine.
Thanks
Comment
-
As I understand it, the primary dataseries is processed first, via OnBarUpdate() with BarsInProgress == 0.Originally posted by Harry View PostI don't want to interfere too much, but if you load a secondary bar series via an indicator, the problem may have been caused by the indicator code. When the primary bar series is processed, the last bar of the secondary bar series may not yet have been processed. This is due to the way NinjaTrader processes the primary and secondary bars.
Then the subsequent dataseries are processed.
Since my code to check the timespan since the previous bar is only executed in OnBarUpdate() for the current dataseries (which are accessible via Time[0], Close[0] etc without needing to reference BarsInProgress), then the state of the other dataseries outside of their respective OnBarUpdate() events is irrelevant, no?
Comment
-
Thanks adamus, I would not have an explanation from the scenario presented and would need to reproduce it here to further investigate and potentially follow up with development. How did you exactly determine that the bar was not loading as you would expect? Per your custom routine posted? To isolate any custom code contributing here, please just print the CurrentBars / OnBarUpdates you get for your load scenario to confirm.Originally posted by adamus View PostHi Bertrand,
no, there were no pacing violations. I am very familiar with pacing violations so I can say that definitively.
You are correct that this issue only exists in the dataseries added in the Initialization Add() routine.
Thanks
Comment
-
Hi Bertrand,
obviously that gap disappeared because I had to trade and got it fixed before I read your reply.
Today it is behaving itself. I have a Print statement in there to output the BarsInProgress, CurrentBar and bar time, but I need to distinguish which chart outputs which line.
I was using ChartControl.ParentForm.Name but that isn't working in all cases.
How can I get that title?
Thanks
Comment
-
Never without a gap, every day since I started this.
This is the gap I had today.
Chart[$EURUSD (3 Min) 2013-10-18] Indicator: PermaCodeSR005 bar#74 60Minute @2013-10-17 23:00 is more than 1 bar interval since previous bar! (2013-10-17 00:00). Should be time span of 0 days 1 hours 0 mins & 0 secs. Try reloading historical data.
Hope it gets us somewhere.
This was a clean load after I filled the HDM with data from IQ Feed which avoided the Interactive Brokers 'pacing violations' minefield - although it is while running against Interactive Brokers, since I disconnected from IQ Feed and reconnected to IB (yesterday).
This morning I just loaded up Ninja and connected to IB as usual.Attached FilesLast edited by adamus; 10-18-2013, 01:08 PM.
Comment
-
So far (just this week) I have loaded the charts 2 without deleting the cache first, and both times (including today) it gave me a gap.
The other 3 days, I deleted the cache, and loading up and connecting Ninja to IB went like a dream.
Also as I said above, sometimes ChartControl.ParentForm.Text has no value - as in the error messages I generate for this situation. Why would that be? Is there any other place to obtain the window name?
Thanks
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
86 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
48 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
29 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
32 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
67 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment