Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnMarketDepth(MarketDepthEventArgs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    OnMarketDepth(MarketDepthEventArgs

    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
    Hello ATI User,

    There's a sample you can work from here that can help you with working in market depth:


    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.
    Last edited by NinjaTrader_RyanM1; 05-13-2011, 10:35 AM.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      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

      Comment


        #4
        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

        Comment


          #5
          disconnected Kinetick...so only on Zenfire feed

          for 6B I only get one level on DOM...which is only bid/ask size.,...see pic
          Attached Files

          Comment


            #6
            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

            Comment


              #7
              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
              Attached Files

              Comment


                #8
                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
                Attached Files

                Comment


                  #9
                  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

                  Comment


                    #10
                    excellent....changed code from crossover to other condition and it print book fine...thanks
                    Attached Files

                    Comment


                      #11
                      hi, does the OnMarketDepth(MarketDepthEventArgs e) event trigger anytime there is a update to the DOM? or does it fire on CalculateOnBarClose setting?

                      meaning is it independent to the CalculateOnBarClose setting?

                      Comment


                        #12
                        Originally posted by pipsalottle View Post
                        hi, does the OnMarketDepth(MarketDepthEventArgs e) event trigger anytime there is a update to the DOM? or does it fire on CalculateOnBarClose setting?

                        meaning is it independent to the CalculateOnBarClose setting?
                        Yes, correct - it will not be tied to OnBarUpdate / CalculateOnBarClose.

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                        0 responses
                        649 views
                        0 likes
                        Last Post Geovanny Suaza  
                        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                        0 responses
                        370 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by Mindset, 02-09-2026, 11:44 AM
                        0 responses
                        109 views
                        0 likes
                        Last Post Mindset
                        by Mindset
                         
                        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                        0 responses
                        573 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by RFrosty, 01-28-2026, 06:49 PM
                        0 responses
                        576 views
                        1 like
                        Last Post RFrosty
                        by RFrosty
                         
                        Working...
                        X