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 judysamnt7, 03-13-2023, 09:11 AM
            4 responses
            59 views
            0 likes
            Last Post DynamicTest  
            Started by ScottWalsh, Today, 06:52 PM
            4 responses
            36 views
            0 likes
            Last Post ScottWalsh  
            Started by olisav57, Today, 07:39 PM
            0 responses
            7 views
            0 likes
            Last Post olisav57  
            Started by trilliantrader, Today, 03:01 PM
            2 responses
            22 views
            0 likes
            Last Post helpwanted  
            Started by cre8able, Today, 07:24 PM
            0 responses
            10 views
            0 likes
            Last Post cre8able  
            Working...
            X