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 RideMe, 04-07-2024, 04:54 PM
            6 responses
            31 views
            0 likes
            Last Post RideMe
            by RideMe
             
            Started by tkaboris, Today, 05:13 PM
            0 responses
            2 views
            0 likes
            Last Post tkaboris  
            Started by GussJ, 03-04-2020, 03:11 PM
            16 responses
            3,281 views
            0 likes
            Last Post Leafcutter  
            Started by WHICKED, Today, 12:45 PM
            2 responses
            19 views
            0 likes
            Last Post WHICKED
            by WHICKED
             
            Started by Tim-c, Today, 02:10 PM
            1 response
            10 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X