Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cumulative Depth from Super DOM

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

    Cumulative Depth from Super DOM

    Hello all!
    Can I get the Cumulative Depth values of buy and sell from SuperDOM and put them into my strategy? If yes, how? Thanks!

    #2
    Hello YevhenShynkarenko,

    Thank you for your inquiry.

    Unfortunately, there is no basic way of obtaining the cumulative depth values of buy and sell. You would have to obtain these values manually and add them together to get your cumulative depth.

    The Reference Samples section of the forum provides helpful information to allow you to get this market depth data. I would recommend looking at this topic in particular: http://www.ninjatrader.com/support/f...ead.php?t=5965

    Using the output, you will be able to look through the code and determine how to obtain that market depth data.

    With that in mind, take a look at line 183-184 of the code I provided in the link above:
    Code:
    for (int idx = 0; idx < askRows.Count; idx++)
         Print("Ask Price=" + askRows[idx].Price + " Volume=" + askRows[idx].Volume + " Position=" + idx);
    I'd create a long variable (because Volume is a long), and increment it by the Volume of the specific row index on every loop, like below:
    Code:
    for (int idx = 0; idx < askRows.Count; idx++)
    {
         Print("Ask Price=" + askRows[idx].Price + " Volume=" + askRows[idx].Volume + " Position=" + idx);
         cumulativeDepthAsk += askRows[idx].Volume;
    }
    
    cumulativeDepthAsk = 0;
    You'll want to be sure to reset your variable to 0 after the loop is finished or it would continue to add on whatever amount was already in there.
    Zachary G.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    46 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    14 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    20 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    22 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X