![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Apr 2006
Location: , ,
Posts: 1,316
Thanks: 1
Thanked 7 times in 7 posts
|
this sample code compiles in strategy however does not output to Output window
compiles in indicator also and does not output protected override void OnMarketDepth(MarketDepthEventArgs e) { // Print some data to the Output window if (e.MarketDataType == MarketDataType.Ask && e.Operation == Operation.Update) Print("The most recent ask change is " + e.Price + " " + e.Volume); } |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hello ATI User,
There's a sample you can work from here that can help you with working in market depth: http://www.ninjatrader.com/support/f...ead.php?t=3478 Are you subscribed to market depth? When you pull up a Superdom you can see market depth levels. If your connection does not support it, you can use the simulated data feed.
Ryan M
NinjaTrader Customer Service
Last edited by NinjaTrader_RyanM; 05-13-2011 at 10:35 AM.
|
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Apr 2006
Location: , ,
Posts: 1,316
Thanks: 1
Thanked 7 times in 7 posts
|
thanks Ryan
the code I posted is from the NT help file...so maybe it needs to be updated? apparently I am not subscribed to market depth as Josh's code does not output either...nor can I get levels on the DOM I am trying for the ES with Zenfire and Kinetick Live feeds....how do I get subscribed |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Thanks for the reply. Yes, it sounds like you are not seeing market depth so the code won't output either.
All Zenfire accounts should be enabled for market depth but for Kinetick this is a separate enablement. To view market depth for the Zenfire connection, make sure you are connected to Zenfire first. You can contact sales 'at' kinetick 'dot 'com to add market depth to your Kinetick account.
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Apr 2006
Location: , ,
Posts: 1,316
Thanks: 1
Thanked 7 times in 7 posts
|
disconnected Kinetick...so only on Zenfire feed
for 6B I only get one level on DOM...which is only bid/ask size.,...see pic |
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Not sure why you are seeing that. Are you using the latest version of NT and viewing June contract? Please contact your broker to check your account is properly setup for market depth on 6B. If you'd like for us to confirm that we see the same thing, send your username and password to support 'at' ninjatrader 'dot' com Attn: RyanM and we will test here.
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Apr 2006
Location: , ,
Posts: 1,316
Thanks: 1
Thanked 7 times in 7 posts
|
thanks...Mirus cleared up issue
first at my end did not have Show Market Depth set true....howeve still did not work...had to Reset Instruments....now fine on Zenfire...even when Zen is secondary feed to Kinetick DOM does not work at all on Kinetick...sent them an email |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Apr 2006
Location: , ,
Posts: 1,316
Thanks: 1
Thanked 7 times in 7 posts
|
back to original issue
SampleMarketDepth does not work on 20 tick chart or 10 range chart....any chart ...even though getting market depth on DOM now |
|
|
|
|
|
#9 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
OK - Glad to hear it was a simple setting. For the SampleMarketDepth indicator, it only displays output during a CrossOver condition. If you want to evaluate for ask changes, the code snippet in your first post is good.
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#10 |
|
Senior Member
Join Date: Apr 2006
Location: , ,
Posts: 1,316
Thanks: 1
Thanked 7 times in 7 posts
|
excellent....changed code from crossover to other condition and it print book fine...thanks
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| OnMarketDepth | dave1992 | Version 7 Beta General Questions & Bug Reports | 41 | 11-01-2010 05:05 PM |
| MarketDepthEventArgs.Price is always set to zero for row removal operations | ScoobyStoo | Version 7 Beta General Questions & Bug Reports | 64 | 08-26-2010 10:39 AM |
| OnMarketDepth : MarketDepthEventArgs | eqtrader | General Programming | 2 | 08-12-2010 03:55 PM |
| OnMarketDepth() | funk101 | General Programming | 2 | 09-28-2009 11:03 AM |
| MarketDepthEventArgs - Clarification needed | ScoobyStoo | General Programming | 19 | 05-21-2009 04:29 AM |