Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SuperDOM freezes when I add APQ column

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

    SuperDOM freezes when I add APQ column

    Just what it says. I do have Level II data. And the DOM worked before RTH, but during RTH SuperDOM froze and I tried to set it up again. Every time I try to add the APQ column, it freezes. I'm on a Mac, using Parallels Desktop, with the latest version of NinjaTrader.

    #2
    Hello marianbusoi,

    Thank you for posting.

    So I may look into this further please go to Help->Email Support and be sure to include Attn: Chris Jameson in the Subject line, a link to this thread in the body and a check in the box for "Log and trace files".

    Thanks in advance.
    Christopher J.NinjaTrader Customer Service

    Comment


      #3
      Hi there! I encountered a similar issue with the APQ column causing SuperDOM lag, especially during high-volume RTH periods. The problem arises because the APQ column processes every single market depth update, which can overwhelm the system, particularly when running on Parallels.

      Here's a straightforward solution:

      1. Copy the new APQ column code in the NinjaScript Editor.
      2. Add at class level:

      Code:
      private static DateTime lastUpdate = DateTime.MinValue;

      3. In your OnStateChange SetDefaults, add:

      Code:
      UpdateIntervalSeconds = 3;

      4. At the beginning of the OnMarketDepthUpdate method, right after the method signature, add:

      Code:
      private void OnMarketDepthUpdate(object sender, Data.MarketDepthEventArgs e)
      {
      if (SuperDom.Account == null || SuperDom.Account.Orders.Count == 0) return;
      // This will only update the APQ column when there are actually orders in the account.
      // This makes the code more efficient since it won't process market depth updates when there are no orders to track APQ for.
      
      if ((DateTime.Now - lastUpdate).TotalSeconds < UpdateIntervalSeconds) return;
      lastUpdate = DateTime.Now;
      }
      This modification ensures that the APQ column updates every 3 seconds (or whatever interval you set) instead of processing every tick. The trade-off is slightly less frequent APQ updates, but it keeps SuperDOM responsive during busy market periods when there are actual orders in the account.

      5. Add this property to control update frequency (in the Properties region of the code):

      Code:
      [Range(1, 60)]
      [Display(Name = "Update Interval (seconds)", Description = "Set the market depth update interval", Order = 1)]
      public int UpdateIntervalSeconds { get; set; }

      You can adjust the `UpdateIntervalSeconds` in the SuperDOM properties to find the right balance between update frequency and performance for your setup.

      If it works for you, press the button like
      ​​

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      74 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      45 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      26 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      32 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      62 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X