Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Historical Bid/Ask Data
Collapse
X
-
Historical Bid/Ask Data
I thought I remembered hearing that historical bid/ask data would be available in NT8. How would I access this from an indicator?Tags: None
-
Hello,
It sounds like you are looking for the TickReplay setting, which will process historical bars according to the actual flow of Bid/Ask updates that occurred within each bar. You can find more information about enabling TickReplay at the link below:
http://www.ninjatrader.com/support/h...ick_replay.htm
Our documentation for enabling TickReplay in an indicator's code is currently under construction, but bear with us if you're developing your own indicator, and we should have it completed soon.Dave I.NinjaTrader Product Management
-
-
Hello,
TickReplay should work on real-time charts, as well. It will allow the historical calculations of an indicator or strategy on a real-time chart to use the actual tick updates of the historical bars, the same as it is doing on the real-time bars on the chart.Dave I.NinjaTrader Product Management
Comment
-
-
hi,
Does this actually provide bid/ask info ?
Here's my code, it seems Bid/Ask info is simulated info, and with bid=last and ask=last+1.
So i get always negative delta
Moreover, the doc says in NinjaScript > Educational Resources > Tips >Using Historical Bid/Ask Series
When processing your NinjaScript, the historical bid/ask series would have the historical portion triggered in the OnBarUpdate() method only. OnMarketData() method events for the historical bid/ask series would only be triggered in real-time.
Code:protected override void OnMarketData(MarketDataEventArgs e) { if (e.MarketDataType==MarketDataType.Last) { int delta=0; if (e.Price>=e.Bid) delta=(int)e.Volume; if (e.Price<=e.Ask) delta=(int)-e.Volume; totalvolume += delta; hi = Math.Max(hi, totalvolume); lo = Math.Min(lo, totalvolume); }
Comment
-
Originally posted by gomifromparis View Posthi,
Does this actually provide bid/ask info ?
Here's my code, it seems Bid/Ask info is simulated info, and with bid=last and ask=last+1.
So i get always negative delta
Originally posted by gomifromparis View PostMoreover, the doc says in NinjaScript > Educational Resources > Tips >Using Historical Bid/Ask Series
If you enable TickReplay however, OnMarketData will be fired for every tick that went into building that bar.
Originally posted by gomifromparis View PostSo where so we stand ? Is there the way to find on historical data, the bid/ask synced with every tick ?MatthewNinjaTrader Product Management
Comment
-
-
Your post suggests that the last price is always equal to the bid price, which is not expected...
I've tested the tick replay on our NinjaTrader historical data servers and against Kinetick and can confirm the the last price does alternate between the bid and ask as I would expect using our tick replay feature.
To make sure we're on the same page regarding how tick replay is working: can you run a quick test and check if e.Price == e.Ask and ensure you're getting some prints? If the tick data was synthetically generated, that condition would never be true.
Also please do note that this tick replay data from a NinjaTrader data server would only work from the time period we started recording tick replay data, which would be after May 3 2015. Any data you're testing before that date which originated from a NinjaTrader historical data server, or was migrated from NinjaTrader 7 upon your own installation, would be synthetic data (which may be why you made the observation re: bid=last and ask=last+1)
Regarding your negative Delta: I guess I'm a little confused based off your test case, please correct me if I am wrong, but wouldn't both of these conditions always (mostly, for an instrument like the ES) be true?
Code:if (e.Price>=e.Bid) //e.Ask? { delta=(int)e.Volume; } if (e.Price<=e.Ask) //e.Bid? { delta=(int)-e.Volume; }
Conversely, if the last price was less/equal the ask-> price would be greater than or equal to the bid.
Since they're both true, the delta would always be a negative value... When I reverse the conditions, I get results I would expect based on how I understand a Delta Divergence Indicator to work.MatthewNinjaTrader Product Management
Comment
-
Sorry for wasting your time, guys, of course delta implementation was quick and dirty, and a little too dirty...
Works now, thanks.
Sorry again
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by fx.practic, 10-15-2013, 12:53 AM
|
5 responses
5,403 views
0 likes
|
Last Post
by Bidder
Today, 12:22 AM
|
||
Started by Shai Samuel, 07-02-2022, 02:46 PM
|
4 responses
94 views
0 likes
|
Last Post
by Bidder
Today, 12:11 AM
|
||
Started by DJ888, Yesterday, 10:57 PM
|
0 responses
6 views
0 likes
|
Last Post
by DJ888
Yesterday, 10:57 PM
|
||
Started by MacDad, 02-25-2024, 11:48 PM
|
7 responses
158 views
0 likes
|
Last Post Yesterday, 10:23 PM | ||
Started by Belfortbucks, Yesterday, 09:29 PM
|
0 responses
8 views
0 likes
|
Last Post
by Belfortbucks
Yesterday, 09:29 PM
|
Comment