NinjaTrader Support Forum  
X

Attention!

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


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 06-05-2012, 04:06 PM   #1
james@iknowsystems.com
Junior Member
 
Join Date: Oct 2011
Posts: 6
Thanks: 0
Thanked 0 times in 0 posts
Default Orders and OnMarketData

Does OnMarketData get called for each Order placed in a market?

Are the Ask / Bid Values in OnMarketData the same as the values in the Time and Sales window?

James Donald
james@iknowsystems.com is offline  
Reply With Quote
Old 06-06-2012, 02:40 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,404
Thanks: 252
Thanked 974 times in 957 posts
Default

Correct James, OnMarketData() and the Time and Sales windows access the same Level 1 data stream.

OnMarketData() will get called for each of those event args -

MarketDataType.Ask

MarketDataType.Bid

MarketDataType.DailyHigh

MarketDataType.DailyLow

MarketDataType.DailyVolume

MarketDataType.Last

MarketDataType.LastClose (prior session close)

MarketDataType.Opening
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 06-06-2012, 01:22 PM   #3
james@iknowsystems.com
Junior Member
 
Join Date: Oct 2011
Posts: 6
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks Bertrand.
james@iknowsystems.com is offline  
Reply With Quote
Old 06-15-2012, 12:12 PM   #4
james@iknowsystems.com
Junior Member
 
Join Date: Oct 2011
Posts: 6
Thanks: 0
Thanked 0 times in 0 posts
Default T&S Match

I am having problems getting the data from OnMarketData to match the T&S window.

I set up a threshold to only show me Asks / Bids larger than a threshold. I set the T&S size filter to the same threshold. I seem to get more Ask / Bids from my indicator than shown on the T&S.

Does the T&S apply any additional filtering on the Ask / Bid Volume?

James Donald
james@iknowsystems.com is offline  
Reply With Quote
Old 06-15-2012, 12:18 PM   #5
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

James,

The time and sales window does not display bid / ask volume. It's transactional volume which would be volume during Last updates if comparing with OnMarketData() stream.
Last edited by NinjaTrader_RyanM; 06-15-2012 at 12:23 PM.
NinjaTrader_RyanM is offline  
Reply With Quote
Old 06-15-2012, 06:20 PM   #6
james@iknowsystems.com
Junior Member
 
Join Date: Oct 2011
Posts: 6
Thanks: 0
Thanked 0 times in 0 posts
Default MarketDataType.Last

Ryan,

I got it to match the T&S now, but what does MarketDataType.Last mean?

James
james@iknowsystems.com is offline  
Reply With Quote
Old 06-16-2012, 06:57 AM   #7
RJay
Senior Member
 
Join Date: May 2008
Location: Hartford, CT. USA
Posts: 618
Thanks: 12
Thanked 24 times in 18 posts
Default

Hi James,

Bid and Ask refer to updates to the number of limit order contracts available at the current Bid and Ask prices.

"Last" refers to contracts traded.

RJay
RJay is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OnMarketData PDT123 Indicator Development 2 01-24-2012 07:22 AM
orders in OnMarketData continue to submit Trader.Jon Strategy Development 4 03-28-2011 10:52 AM
OnMarketData cicondo Strategy Analyzer 3 07-19-2010 11:30 AM
OnMarketData rt-trader Version 7 Beta General Questions & Bug Reports 4 05-06-2010 11:06 AM
OnMarketData SystemTrading General Programming 2 09-09-2008 04:51 PM


All times are GMT -6. The time now is 11:35 PM.