Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

diff between onbarupdate and onmarket update

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

    diff between onbarupdate and onmarket update

    from a strategy coding perspective, what is the diff between on market update and on barupdate. why is there 2 options. which should be used for what reason.

    #2
    Hi junkone,

    The OnBarUpdate() is called for every bar's update - http://www.ninjatrader-support.com/H...dateEvent.html

    This takes into account the CalculateOnBarClose setting - http://www.ninjatrader-support.com/H...BarClose1.html

    When set to false, the OnBarUpdate() is called for every incoming tick.

    The OnMarketData() is called for every change in Level1 data, for example Bid/Ask/Last/Volume - http://www.ninjatrader-support.com/H...arketData.html

    OnMarketDepth would be used for Level2 data changes - http://www.ninjatrader-support.com/H...rketDepth.html
    BertrandNinjaTrader Customer Service

    Comment


      #3
      what defines tick in terms of IB as datasoruce. is it every bid/ask or is it the 5 sec update that IB sends.
      the reason, i am very curious is that, my strategy subscribes to custom events. i can trace the processing to the event handler and it seems to process it. however further processing is not happening and the only bottle neck that i can see is that the strategy did not get a new barupdate tick and was waiting for it to come. i have seen it wait for the tick for as much as 20 seconds.

      Comment


        #4
        Hi junkone, tick is whatever update your datasource gives you, so for example if you run it on CalculateOnBarClose = false you could have an idle time because no fresh tick has come in that would have triggerd your OnBarUpdate(). Have you debugged your strategy with Print() statements?
        BertrandNinjaTrader Customer Service

        Comment


          #5
          what is the tick update frequency for IB.
          my barupdate runs only on tick updates. the only issue is that randomly its seems to be very delayed

          Comment


            #6
            For the last in the OnBarUpdate() I think it would be the snapshot, so you could try accessing bid / ask changes in the OnMarketData(). How do you determine the tick arrives delayed in those instances?
            BertrandNinjaTrader Customer Service

            Comment


              #7
              i can track my event till the point where it is calling onbarupdate. basically, i have a print events passed to the chart functiolaity within the onbarupdate. i dont see those refreshes on a consistent interval.

              Comment


                #8
                There is no constant tick refresh / update, this will depend on the current market - have you tried another datasource to compare?
                BertrandNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by bortz, 11-06-2023, 08:04 AM
                47 responses
                1,603 views
                0 likes
                Last Post aligator  
                Started by jaybedreamin, Today, 05:56 PM
                0 responses
                8 views
                0 likes
                Last Post jaybedreamin  
                Started by DJ888, 04-16-2024, 06:09 PM
                6 responses
                18 views
                0 likes
                Last Post DJ888
                by DJ888
                 
                Started by Jon17, Today, 04:33 PM
                0 responses
                4 views
                0 likes
                Last Post Jon17
                by Jon17
                 
                Started by Javierw.ok, Today, 04:12 PM
                0 responses
                12 views
                0 likes
                Last Post Javierw.ok  
                Working...
                X