Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

OnMarketData. How to know all trades with the same timestamp processed?

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

    OnMarketData. How to know all trades with the same timestamp processed?

    If time resolution of records enough all trades with the same timestamp generated instantly as a single event inside exchange's kernel. In order to know my strategy recieved all trades of this block of trades, I wait for a first trade with a timestamp greater than previous. Can I avoid the delay and to know that the current trade which I recevied inside OnMarketData is the last trade of this single timestamp block? And the same question for any other single timestamp events. Fore example for qoutes recieved by OnMarketDepth.

    PS. I suppose that MarketDataEventArgs.Time is the time when a trade generated inside exchange's kernel and not time when OnMarketData recived this information. Is it correct for CQG?​
    Last edited by liberal; 09-15-2022, 04:55 AM.

    #2
    Hello liberal,

    I'm not aware of a way to receive individual trade information. NinjaTrader is only receiving market updates from the data provider. It's not directly from the exchange. Some data providers aggregate data, some don't. Some data providers include non-qualifying-trades some don't.

    In order to know my strategy recieved all trades of this block of trades, I wait for a first trade with a timestamp greater than previous
    There can be many ticks or market updates (which could be completely separate trades) in the same second and even with the same millisecond, which is the finest granularity NinjaTrader has available.

    Can I avoid the delay and to know that the current trade which I recevied inside OnMarketData is the last trade of this single timestamp block?
    I would not think it would be possible to know any market update is one specific trade, but every market update would be at least one trade..
    As far as the delay, are you referring to waiting for a new time stamp? I don't quite understand why you are waiting for a new timestamp. Just process every market update as a separate block of trades.

    I suppose that MarketDataEventArgs.Time is the time when a trade generated inside exchange's kernel and not time when OnMarketData recived this information.​
    This would be the time stamp of the market data event on the data providers servers when data is sent out, which could be slightly different from the exact exchange trade times, especially if the data provider aggregates data.

    Is it correct for CQG
    Unfortunately, I would not be able to say too much about the specifics of how CQG's internal servers process the data.. but from my understanding CQG does not aggregate data.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello liberal,
      As far as the delay, are you referring to waiting for a new time stamp? I don't quite understand why you are waiting for a new timestamp. Just process every market update as a separate block of trades.
      Because this block of trades is not separate, physically it's a single event, and to make a trading decision I need to know the total volume of all this ticks inside the event (total traded volume of the current timestamp).




      Last edited by liberal; 09-15-2022, 08:59 AM.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by helpwanted, Today, 03:06 AM
      1 response
      12 views
      0 likes
      Last Post sarafuenonly123  
      Started by Brevo, Today, 01:45 AM
      0 responses
      9 views
      0 likes
      Last Post Brevo
      by Brevo
       
      Started by aussugardefender, Today, 01:07 AM
      0 responses
      5 views
      0 likes
      Last Post aussugardefender  
      Started by pvincent, 06-23-2022, 12:53 PM
      14 responses
      242 views
      0 likes
      Last Post Nyman
      by Nyman
       
      Started by TraderG23, 12-08-2023, 07:56 AM
      9 responses
      387 views
      1 like
      Last Post Gavini
      by Gavini
       
      Working...
      X