PDA

View Full Version : DOM access within indicator


RedDuke
09-24-2007, 07:10 PM
I am developing an indicator that analyzes Super DOM using a sample provided on this forum.

The logic utilizes below event to react to changes in DOM
private void OnMarketDepth(object sender, MarketDepthEventArgs e)
{….}

In order to analyze various levels of DOM, I have the following logic:
if ( e.MarketDataType == MarketDataType.Ask && e.Position == 0)
ask = e.Price;
if ( e.MarketDataType == MarketDataType.Bid && e.Position == 0)
bid = e.Price;

This logic gets me the nearest bid and ask prices. However, there are a lot of times when values in either ask or bid are 0. This should not happen as there is always ask and bid even of the spread between them widens.

Why does this happen?

Is there a better way of coding to retrieve bid and ask then above?

Thanks,
redduke

NinjaTrader_Ray
09-24-2007, 07:52 PM
Give us a few more weeks and we will officially support a new method named OnMarketDepth() in both indicators and strategies. This will clearly be documumented and include reference samples for building your own price ladder based on calls to this method.

RedDuke
09-24-2007, 10:32 PM
Hi Ray,

Thanks for the info. Does it mean that Ninja 6.5 will be released within next several weeks?

Thanks,
Alex

NinjaTrader_Dierk
09-24-2007, 11:35 PM
We release first beta of NT6.5 within the next few weeks.

RedDuke
09-25-2007, 08:20 AM
Dierk,

Am I right to assume that DOM and T&S will be supported in 6.5. I think that was what Ray meant when he said few weeks.

Thanks,
redduke

NinjaTrader_Dierk
09-25-2007, 08:24 AM
DOM and T&S displays are supported with NT6. Access to level1 and level2 data will be supported with NT6.5.

RedDuke
09-25-2007, 10:24 AM
Dierk,

Sorry I meant to say programatic access to DOM and T&S, the display windows of these features are there already of course.

redduke