NinjaTrader Support Forum

NinjaTrader Support Forum (
-   General Development (
-   -   SampleMarketDepth is back (

Kowal 07-29-2009 06:34 AM

SampleMarketDepth is back

I would like to use level II data from SampleMarketDepth in strategy. I realize that its impossible and requires additional programming.

1. Could You tell me what exactly has to be done to make it work?
2. In NT7 - will we have access to level II from strategy?
3. Is there a chance You could write basic strategy sample using level II? (sorry, I had to ask :))


NinjaTrader_Bertrand 07-29-2009 06:40 AM

Kowal, the sample is provided to get you going and familiar with the OnMarketDepth() method in NinjaScript, the use would be the same in your custom strategy, but yes it would require custom coding -

We're always looking to expand our available reference sample materials, please visit this link here at regular intervals for updates -

If you need custom programming, please consider contacting a consultant from this list -

Kowal 07-29-2009 08:35 AM


thanks for quick reply.
Let me rephrase my second question:
in NT7 - will we have access to level II data from strategy without additional programing?
My first question is still one the table. I would like to know what has to be done, so then I could contact consultants and tell them --exactly-- what I need.

NinjaTrader_Bertrand 07-29-2009 08:44 AM

Kowal, in NinjaTrader 7 you'll also need to work with the OnMarketDepth() method to access and use Level2 data in your strategy.

There's no generic answer to your question 1 unfortunately, you have the access to Level2 data using OnMarketDepth() in your strategy, what you then want to do with this is tied to your custom conditions / filters used for generating the trading decisions based on that.

Kowal 07-29-2009 10:56 AM


I did what You said, and believe or not, its working. Strategy takes position depend on changes in level II. Wasnt that hard as I thought.

Vielen dank!

NinjaTrader_Bertrand 07-29-2009 10:57 AM

Great Kowal, thanks for reporting back.

All times are GMT -6. The time now is 06:12 AM.