Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnMarketData Volume & Tick Issues

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

    OnMarketData Volume & Tick Issues

    NT,

    I have noticed that I am getting bad tick and volume counts while collecting data in the OnMarketData section of code.

    It seems that when using if (FirstTickOfBar) to reset tick or volume counters for the prior bar, I loose the data for the first tick of the current bar.

    Is this normal???

    By time FirstTickOfBar executes, the first tick of the bar has already executed and the data for the first tick is gone!!!!

    Pictures of this problem along with additional text can be found here.



    Is this a known bug????

    Thanks,

    RJay
    RJay
    NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

    #2
    Hello,

    Just to clarify,

    Your using FirstTickOfBar in OnBarUpdate() correct and not OnMarketData().

    Can you I please see the code your using for If FirstTickOfBar, your not using return or anything like the right?

    These counter variables, are you updating them in OnMarketData() or OnBarUpdate()?

    I look forward to assisting you further.
    BrettNinjaTrader Product Management

    Comment


      #3
      I'm using first tick of bar in OnMarketData().
      RJay
      NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

      Comment


        #4
        Hello,

        Please see the following page:



        Please see the following Note on this page.

        NOTE: This property should NOT be accessed outside of the OnBarUpdate() method.

        Using this in OnMarketData() coudl yield unexpected results. Please resolve this before continuing on. Also please insure your not using a return; command to exit the loop before variables are updated as this would cause you to lose your FirstTickOfBar data.

        Let me know if I can be of further assistance.
        BrettNinjaTrader Product Management

        Comment


          #5
          Just wanted to clarify this.

          Thanks,

          RJay
          RJay
          NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          592 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          343 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          556 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          554 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X