Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
There are 3 data feeds in NinjaTrader, and they will go out of sync often. Depending on what you are trying to do you may see some weird stuff.
For modeling purposes, stay away from the OnBarUpdate event. It front runs the other two (OnMarketData, OnMarketDepth) and will be off by a magnitude too far to be able to reconcile. OnMarketData and OnMarketDepth run pretty close together, at least if you are reading a playback file. Trying to process a live data feed 100% in sync would be challenging if not impossible. The way these cycles run, you will see throttling due to internet latency, data feed latency, or .net CG, then you will see a burst of data, then back to throttling, etc.
In the analytical world there is no such thing as art, there is only the science you know and the science you don't know. Characterizing the science you don't know as "art" is a fools game.
When you were writing about the feeds losing sync, I didn't expect it within the same data feed. I thought you were speaking about the level 2 and the t&s losing sync with each other! But you're talking about even within the same stream? The level 2 data can be out of sync with other level 2 data on the same feed?
I have no code in the OBU and I have Calculate.OnBarClose set on a one minute chart so OBU shouldn't really be causing a problem, I wouldn't think. Are you aware of any white papers or other tech links anywhere? This seems pretty bizarre.
Thank you for sharing your awesome insights. Are you able to please post a few tips and hints for how it can be applicable for us? Maybe a pseudo-trade with random price levels and order quantities.
The TLDR is that OnBarUpdate front runs the other two data feeds often by several seconds. Calling GetCurrentBid() or GetCurrentAsk() from OnBarUpdate is the fastest way to see the current price. Their product manager confirmed this on the thread. I tried to build some algo's with NinjaTrader back in the day. The fastest I ever got it was running Unmanaged code using mostly OnBarUpdate / GetCurrentBid(), GetCurrentAsk() calls from a VPS in Chicago, but it was several orders of magnitude too slow during the US cash sessions to even read the current price level. All of the level2 modeling was so far behind that nothing from the top of the book was even slightly relevant. You may have a shot at signals from the top of the book at night, or if the market is extremely slow in the afternoon, but there is virtually no change you will ever be able to do the type of modeling I described in this blog with NinjaTrader in real time.
In the analytical world there is no such thing as art, there is only the science you know and the science you don't know. Characterizing the science you don't know as "art" is a fools game.
Your best bet if you are a discretionary trader is this: Use one of the "estimated place in the queue" tools from your favorite software. NinjaTrader has one, I think Sierra and maybe a few others do as well. Get in line early and often, wait until you get close to the front of the line. If you don't make it to the top 10% or at least top 25%, cancel and repeat. Once you get near the top, your chances of landing a non toxic limit order fill increase 10 fold. This will impact your P&L in a very significant way. The take away and relevance from this blog and the analysis relating to this point is: The strong side always wins the initial tick vs. tick battle, but only fills a tiny fraction of the queue. So if you can get into that top 10% / 25% you have a chance at both a fill and a +1 tick starting position.
But aside from this, I don't think any of this type of modeling could be applicable to discretionary traders. It wouldn't be possible to process this type of data in real time with retail tools, let alone using heuristics you could memorize and click on. The best analogy for this would be attempting one of those impossible user designed Mario maker courses.
In the analytical world there is no such thing as art, there is only the science you know and the science you don't know. Characterizing the science you don't know as "art" is a fools game.
Hi @iantg I'm interested about your study....I work with Multicharts, but make fatigue to understand and implemented your search.... can u help me please?