Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Market Replay and Instance of an Object Null Errors
Collapse
X
-
Originally posted by NinjaTrader_ChelseaB View Post
-
Hello Spiderbird,
Downloaded Market Replay data from NinjaTrader's servers has Level 2 Depth of Market for futures.
Leave a comment:
-
Hi Chelsea,
Do you know if that market data provided by NinjaTrader includes DOM or tick data? If so, that would be amazing.
And yes, I'm aware of IB's lack of recording tick data. I've been recording market sessions ever since I found that out.
Good news is that I figured it out!
It had nothing to do with the code per se. It was actually where the strategy was being started from. If you right click on the volumetric chart you want to use for your strategy... select and enable your strategy... it works like charm. That's both with live market data and market replay.
However, if you start the strategy from the Control Center and just select the security, the connection to use and other related parameters, it won't print anything and has null defined for all barsType data. I would have thought by simply pointing the strategy to the security in the Control Center that it would work. But nope! You have to enable the strategy on the actual volumetric chart you want the strategy to run.
So there you go. Problem solved!
Thanks again for your time and attention NinjaTrader_ChelseaB !
Leave a comment:
-
Hello,
The most popular futures and forex instruments are recorded on our market replay server and will usually have up to 90 days worth of data available.
Note, this data can be played back, but does not load historically on a chart.
If you broker is Interactive Brokers, then recording historical tick data would be necessary as historical tick data is not provided.
Leave a comment:
-
Hi Chelsea!
I'm using Market Replay data that I've recorded in previous sessions via NT/IB, utilizing the 'Playback Connection' within NT8. I'm pretty sure I have the option for recording ticks active, but I can record the market tomorrow and double check my settings.
I can usually see all of the volumetric data from the NT guide example when I start the strategy in real time.
For reference, I've usually recording market data to get the tick data I'm looking for in my charts. I'm normally using 20 tick charts to interact with the market.
Are there other settings I should double check?
Leave a comment:
-
Hello Spiderbird,
Historical tick data is necessary for this indicator to load historically.
Market Replay data are recordings used for the Playback connection.
What connection are you connected to?
You may not need to record either of these.
Leave a comment:
-
Hi NinjaTrader_ChelseaB ! Good to see you again.
And yes, I was a dummy. I had neglected to put the following code to null barsType. Here's the updated code:
Code:// For our volumetric bars NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe barsType = Bars.BarsSeries.BarsType as NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe; [B]if (barsType == null) return;[/B] if (IsFirstTickOfBar) // If this is the first tick of a new bar, start all this material {
Am I supposed to use Market Replay or Historical Data to show volumetric bar data in the output window? Historically I've always used the Market Replay option.
Thanks again for your help!
Leave a comment:
-
Market Replay and Instance of an Object Null Errors
Hi all!
I'm running into an issue where some code I've been working on to display volumetric data is throwing up instance of an object errors in Market Replay. It's strange because the code seems to work just fine in a live trading environment, but not on a recorded one.
Here's the specific code that's causing the problem:
Code:protected override void OnBarUpdate() { if (Bars == null) return; // For our volumetric bars NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsType barsType = Bars.BarsSeries.BarsType as NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsType; Print("=========================================== =============================="); Print("Bar: " + CurrentBar); [B]Print("Trades: " + barsType.Volumes[CurrentBar].Trades); Print("Total Volume: " + barsType.Volumes[CurrentBar].TotalVolume);[/B] Print("=========================================== =============================="); }
I know it's probably something basic, but I'd rather check here than banging my head against the wall for another half hour.
Thanks in advance for any advice or guidance! Feel free to send me off to a related URL to learn more if that's easier.
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by SantoshXX, Today, 03:09 AM
|
0 responses
6 views
0 likes
|
Last Post
by SantoshXX
Today, 03:09 AM
|
||
Started by DanielTynera, Today, 01:14 AM
|
0 responses
2 views
0 likes
|
Last Post
by DanielTynera
Today, 01:14 AM
|
||
Started by yertle, 04-18-2024, 08:38 AM
|
9 responses
41 views
0 likes
|
Last Post
by yertle
Today, 01:00 AM
|
||
Started by techgetgame, Yesterday, 11:42 PM
|
0 responses
12 views
0 likes
|
Last Post
by techgetgame
Yesterday, 11:42 PM
|
||
Started by sephichapdson, Yesterday, 11:36 PM
|
0 responses
2 views
0 likes
|
Last Post Yesterday, 11:36 PM |
Leave a comment: