Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How get Bid and Ask Volume in super dom on each tick?

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

    How get Bid and Ask Volume in super dom on each tick?

    I am trying to build super dom columns that use tick volumes Bid and Ask. But it looks like this function does not give me the desired result, or I am not using it incorrectly.

    Code:
    SuperDom.MarketDepth.Asks[i].Volume;

    The part of my code that uses this function.

    Code:
    List<long> sellVolumeList = new List<long>();
    List<long> buyVolumeList = new List<long>();
    
    private void OnMarketDepthUpdate(object sender, Data.MarketDepthEventArgs e)
    {
    
    long sellCount = 0, buyCount = 0;
    
    
    
    for (int i = 0; i < SuperDom.MarketDepth.Asks.Count; i++)
    {
    buyCount += SuperDom.MarketDepth.Asks[i].Volume;
    sellCount += SuperDom.MarketDepth.Bids[i].Volume;
    }
    
    
    
    sellVolumeList.Add(sellCount);
    buyVolumeList.Add(buyCount);
    
    }

    #2
    Hello Goolden,

    Without a description of whats going wrong I couldn't really provide any guidance here. What specifically is wrong with the result you had observed or the line you extracted? Are you seeing an odd value or what is happening surrounding that?

    The existing volume column has a full example of the accumulation logic which could be used for this type of use case in case this relates to the accumulated value in some way.


    I look forward to being of further assistance.

    Comment


      #3
      The problem is that I do not quite understand the operation of this function, or rather the return value, it differs from the values of the current tick. "SuperDom.MarketDepth.Asks.Count" the number of columns here is always 42, but there are no such columns in Super DOM.

      I plan to use the accumulated tick data for further analysis, but since the data does not coincide with what I see at the current tick, its further use does not make sense.

      Comment


        #4
        Hello Goolden,

        I am not certain I understand the comparison you are trying to do with the count. Are you trying to collect volume at each level similar to the existing volume column? The OnMarketDepth may have X number of levels defined but may or may not have a value, you generally need to use the Operation property to delegate the logic. You can see an example of working with the depth from an indicator here: https://ninjatrader.com/support/help...vel_ii_dat.htm

        The existing volume column also shows how to use the OnBarUpdate override which runs on each tick to collect the volumes. This also has a setting for ask and bid built in or buy and sell.

        I look forward to being of further assistance.

        Comment

        Latest Posts

        Collapse

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