Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnMarketData() vs. OnBarUpdate()

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

    OnMarketData() vs. OnBarUpdate()

    I am trying to understand how one of these methods would fire where the other does not.

    1.What event can happen for OnBarUpdate to trigger, where it does not trigger OnMarketData?

    2. Same question, for OnBarUpdate?

    ...

    I might assume for example that, someone withdrew their pending inside bid (causing the inside bid volume to drop), which would trigger an OnMarketData() call, but no change in OnBarUpdate(). Correct?

    I might also assume that any tick update in OnBarUpdate() will also result in an OnMarketData() call (since it ultimately results in a change in either inside bid or inside ask volume, OnMarketData territory). Is this correct?

    #2
    1. If you have CalculateBarOnClose, OnBarUpdate() will not fire every tick while OnMarketData() will.

    2. The same goes for OnMarketDepth().

    OnMarketData() is essentially level 1 data. OnMarketDepth() is level 2 data so you can build your own bid/ask price ladders with OnMarketDepth() which can be seen here: http://www.ninjatrader-support.com/v...ead.php?t=3478

    OnMarketDepth() will change for every bid/ask change while OnBarUpdate() basically just last price.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Hi Josh,

      Understand... But if CalculateBarOnClose = false, then how does OnMarketData() differ from OnBarUpdate()?

      Comment


        #4
        Essentially doesn't.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          OnBarUpdate() fires when an update to the Bar occurs which of course is driven by a last trade event. OnMarketData fires on the last trade event among other events. OnBarUpdate() you get the time of bar, OnMarketData() you get the time of the actual market data event.
          RayNinjaTrader Customer Service

          Comment


            #6
            OK great. This is info that I did not find in the helpful manual. Can you elaborate a little on "among other events"?

            Thanks

            Comment


              #7
              other events - Changes in daily high, low, open, close, bid, ask price and volume
              RayNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by sidlercom80, Today, 02:40 AM
              0 responses
              11 views
              0 likes
              Last Post sidlercom80  
              Started by b16_aln, Today, 01:52 AM
              0 responses
              11 views
              0 likes
              Last Post b16_aln
              by b16_aln
               
              Started by junkone, Yesterday, 08:55 PM
              1 response
              10 views
              0 likes
              Last Post NinjaTrader_Jason  
              Started by adaeiqendqw, 01-16-2021, 02:56 AM
              1 response
              16 views
              0 likes
              Last Post NinjaTrader_Jason  
              Started by [email protected], Yesterday, 06:10 PM
              5 responses
              16 views
              0 likes
              Last Post NinjaTrader_ChrisSch  
              Working...
              X