Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
OnMarketDepth Update...
Collapse
X
-
OnMarketDepth Update...
I'm checking out SampleMarketDepth. I see that the "order book" on the DOM is updating values a lot quicker than the SampleMarketDepth script, (or my OrderBook app for that matter). Is there a way to update the order book like the DOM gets updated? Is there something like the Update() function to force updates from incoming MarketDepth()? I'm *assuming* that the DOM is getting it's data from OnMarketDepth()?Tags: None
-
You are walking into a trap trying to analyze the DOM. The big guys know that.Originally posted by funk101 View PostI'm checking out SampleMarketDepth. I see that the "order book" on the DOM is updating values a lot quicker than the SampleMarketDepth script, (or my OrderBook app for that matter). Is there a way to update the order book like the DOM gets updated? Is there something like the Update() function to force updates from incoming MarketDepth()? I'm *assuming* that the DOM is getting it's data from OnMarketDepth()?
Get a day job.
-
Yeah, totally not the same. If I print from "within" OnMarketDepth() it's the same. If I print from "outside" of OnMarketDepth() it waits for OnBarUpdate(). My indicator overrides Plot(), I just need to figure out the best way for OnMarketDepth() and Plot() to see each other.
Comment
-
Not sure what you mean outside. If you want to print this information you should print it from OnMarketDepth() directly for the most up-to-date information. If you are using Plot() you need to remove the redraw delays from the chart if you are going to even be able to remotely get the same. Go to the Chart Properties to do this.Josh P.NinjaTrader Customer Service
Comment
-
Sorry for being vague, similar to your samplemarketdepth, you get data from onmarketdepth, and populate a List<>. Then in onbarupdate() you loop through and Print() the values. So, yes I guess the chart properties "lag" is the problem there. What I'd like to do is this:
OnMarketDepth(MarketDepthEventArgs e)
{
//g is not seen in here, obviously.
g.DrawString(blah);
}
override Plot([params])
{
base.Plot([params');
etc...
}
Comment
-
Yes, that's what happens. I create my Lists<> in MarketDepth() then in Plot() I loop through and g.Drawstring() works nice. 'Cept, the lag -> when chart decides to update. So, obviously this does not work, but, for example: ...
OnMarketDepth(MarketDepthEventArgs e, Graphics g, Rectangle bounds, double min, double max)
{
foreach (loop)
{
g.DrawString(blah);
}
}
I know I'm missing something, some things in C# elude me.
Comment
-
Could you please elaborate on how to remove the redraw delays from a chart?Originally posted by NinjaTrader_Josh View PostNot sure what you mean outside. If you want to print this information you should print it from OnMarketDepth() directly for the most up-to-date information. If you are using Plot() you need to remove the redraw delays from the chart if you are going to even be able to remotely get the same. Go to the Chart Properties to do this.
I see something called "Display update interval(sec)" is that it? can it be = 0?
would that mean the chart will update whenever onMarketDepth is called?
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
574 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
333 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
553 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment