Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Data Stream differences between Calculate.OnEachTick and OnMarketData?

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

    Data Stream differences between Calculate.OnEachTick and OnMarketData?

    In both NT7 and NT8

    Is there any difference in the input data stream when Calculate.OnEachTick / CalculateOnBarClose = false

    and the data stream in OnMarketData?

    (in terms of volume of tick data?)

    Thanks

    #2
    Hello vantojo,

    Thank you for your reply.

    It's not the same because OnMarketData() updates for every market data change, bid, ask, and last, as well as other market data like Opening, whereas ticks updating in OnBarUpdate will be only last, or only bid, or only ask, depending on what is selected for the AddDataSeries call. OnBarUpdate would not be triggered for something like Opening. Keep in mind OnMarketData is a real-time data stream and can be CPU intensive if your program code is not as optimized as possible.

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Then, are Bid and Ask only Orders, and Last is the last sell/buy transaction?

      Where does Time and Sales get its data stream from?

      Is this also found in OnMarketData?

      Comment


        #4
        Hello vantojo,

        Thank you for your reply.

        Time and Sales gets the bulk of its data from OnMarketData, yes. Last is the last buy/sell transaction, yes, then the bid/asks coming in are the bids and asks from either just the current bid/ask if you only get Level 1 data, but can also be from the whole price ladder. I'd suggest taking a look at this example from our help guide that allows you to print the Level 2 order book to a NinjaScript Output window - we get all the data from this from OnMarketData.



        Please let us know if we may be of further assistance to you.
        Kate W.NinjaTrader Customer Service

        Comment


          #5
          The Order data I don't really care about....I would like to get the data that is in the Time and Sales window for real time analysis....is there a way to do this? Thanks

          Comment


            #6
            Hello vantojo,

            Thank you for your reply.

            Here's some examples my colleague created from an earlier forum post that give examples of getting Time and Sales information from OnMarketData:



            Please let us know if we may be of further assistance to you.
            Kate W.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by bmartz, 03-12-2024, 06:12 AM
            4 responses
            31 views
            0 likes
            Last Post bmartz
            by bmartz
             
            Started by Aviram Y, Today, 05:29 AM
            4 responses
            12 views
            0 likes
            Last Post Aviram Y  
            Started by algospoke, 04-17-2024, 06:40 PM
            3 responses
            28 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by gentlebenthebear, Today, 01:30 AM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by cls71, Today, 04:45 AM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X