Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to programatically access Level II depth-of-market data...

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

    #16
    Hi Lance, thanks for your reply. Are you asking if you can make a SuperDomColumn Script or an Indicator script? I apologize but I'm not following the question you are asking. Please clarify in as much detail as possible.

    Kind regards,
    -ChrisL​

    Comment


      #17
      I'm wondering how I can convert a SuperDomColumn script into an indicator script. I'm looking to quantify the volume profile and print to output window much like the Volume Column script for the SuperDomColumn. I have no interest in visual display, just the volumes at prices for the session to output to ML algos. Just like how 2 Lists of the LadderRow class were created in the SampleLevel2Book script to gather the bid/ask depth at price, I'd like to do the same thing but with Volume (buy/sell orders) for the session, for each price level where the indexes of the Lists start at Last bid/ask similar to SampleLevel2Book.

      Comment


        #18
        Hi Lance, thanks for the reply. We have an example showing how to gather bid/ask volume from a 1 tick data series. You can also do it using Tick replay. See the "BuySellVolume" indicator that comes with the platform for an example.

        https://ninjatrader.com/support/foru...king-something - BuySellVolumeOneTick

        Comment


          #19
          This is for the buy/sell volume per tick which can help but then how to store it at each price level like in Volume Profile instead of per bar like in BuySellVolume? After looking at the built-in Volume Profile indicator (not the Order Flow version), I see the use of a Dictionary(cacheDictionary) and List(sortedDicList) in the OnMarketData method that is recording the buy/sell volume and storing it at the price level as a Key in the Dictionary. This leads to new questions:

          1. Why use a List<Dictionary<double, VolInfoItem>> when it seems that just a Dictionary alone should work?
          2. How can I Print the Value info for a given Key in the Dictionary? How to output the values of the VolInfoItem object (up, down, neutral) given a price level (Key)?

          Comment


            #20
            Hi Lance, thanks for the reply.

            1. This is a design choice by the developer. There are many ways to to the same thing in C#. It is arguably better to just use a Dictionary or KVP class that is built into C# because you can use their convenience methods like finding an entry with ContainsKey(). I recommend studying these data structures so you can practice how to reviieve data from each one. They are documented here:
            (publicly available)



            2. The methods above have helpers that can get certain values from a dictionary.

            Kind regards,
            -ChrisL

            Comment


              #21
              Thanks. I've started looking at those and I can call the keyValue.Key and corresponding volumes from OnRender. of the Volume Profile indicator. Now how to do it in OnBarUpdate so I can create a series to hold those values? Can't I reference the Dictionaries and Lists used in OnMarketData in OnBarUpdate?

              Comment


                #22
                Hi Lance, thanks for your reply. If you need a developer to help one on one to develop a script, please see the NinjaTrader Ecosystem website for a list of programmers for hire:

                Search trading apps & services to cusomize your NinjaTrader platform with trading indicators, signals and strategies.


                Unfortunately, the support team will not be able to help to develop or add to the already existing example that we have provided. All of our tools and educational resources are documented here in our help guide:


                You can use Dictionaries and Lists to hold data passed into OnMarketData and OnBarUpdate. If you need to access any of the price series arrays in a non-data-driven event method, use TriggerCustomEvent within the event to syncronize the data points:
                https://ninjatrader.com/support/help...rcustomevent.h tm

                Kind regards,
                -ChrisL​


                The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

                Comment


                  #23
                  Thanks! I actually figured it out and updated the existing Volume Profile to include transparent plots showing a variety of information such as buy/sell volume at Last traded price, POC, etc. See the output screenshot, yes! This support forum has helped a lot so thanks again. Last question, how to I post the code in a code box like what I see on these threads?

                  Click image for larger version

Name:	image.png
Views:	246
Size:	36.6 KB
ID:	1225966​​
                  Attached Files

                  Comment


                    #24
                    Hi Lance, you can click the "A" on the top left of the text editor, then click the numeric or hashtag symbol in the options:

                    Comment


                      #25
                      Anyone know where I can find the " SampleLevel2Book" code?

                      Comment


                        #26
                        Hello DavidKForum,

                        This can be downloaded from the help guide linked below.


                        I am also including a link to the BuySellVolumeOneTickAtPriceDictionaryExample.
                        Hello everyone I am trying to get the bid ask volume inside the bar from the example the problem is that I need a method to get the bid and ask volume without tick replay. I am trying to create this indicator on my own - from the example of the developers But the result is without successfully Below is my code I ask for
                        Chelsea B.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by NullPointStrategies, Yesterday, 05:17 AM
                        0 responses
                        64 views
                        0 likes
                        Last Post NullPointStrategies  
                        Started by argusthome, 03-08-2026, 10:06 AM
                        0 responses
                        139 views
                        0 likes
                        Last Post argusthome  
                        Started by NabilKhattabi, 03-06-2026, 11:18 AM
                        0 responses
                        75 views
                        0 likes
                        Last Post NabilKhattabi  
                        Started by Deep42, 03-06-2026, 12:28 AM
                        0 responses
                        45 views
                        0 likes
                        Last Post Deep42
                        by Deep42
                         
                        Started by TheRealMorford, 03-05-2026, 06:15 PM
                        0 responses
                        50 views
                        0 likes
                        Last Post TheRealMorford  
                        Working...
                        X