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 junkone, Today, 11:37 AM
            0 responses
            3 views
            0 likes
            Last Post junkone
            by junkone
             
            Started by quantismo, 04-17-2024, 05:13 PM
            5 responses
            34 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by proptrade13, Today, 11:06 AM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Started by love2code2trade, 04-17-2024, 01:45 PM
            4 responses
            34 views
            0 likes
            Last Post love2code2trade  
            Started by cls71, Today, 04:45 AM
            2 responses
            10 views
            0 likes
            Last Post eDanny
            by eDanny
             
            Working...
            X