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 lightsun47, Today, 03:51 PM
            0 responses
            5 views
            0 likes
            Last Post lightsun47  
            Started by 00nevest, Today, 02:27 PM
            1 response
            9 views
            0 likes
            Last Post 00nevest  
            Started by futtrader, 04-21-2024, 01:50 AM
            4 responses
            45 views
            0 likes
            Last Post futtrader  
            Started by Option Whisperer, Today, 09:55 AM
            1 response
            14 views
            0 likes
            Last Post bltdavid  
            Started by port119, Today, 02:43 PM
            0 responses
            9 views
            0 likes
            Last Post port119
            by port119
             
            Working...
            X