• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Difference between tick data series and OnMarketData?

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

    Difference between tick data series and OnMarketData?

    Hi,

    I ported some of my indicators to NT8. One, looking at buy sell volume, for NT7, I added a tick series to the chart and used that as it requires tick data and Tick replay was not available. Now it is, I decided to use OnMarketData instead with tick replay on. As far as I know, the up/down volume code is the same. I did port both versions to NT8 though.

    If I add both indicators to the same chart in NT8, i.e. the one that uses the tick series and one that uses OnMarketData on a 5 range bar chart, I can get different amounts of up/down volume for the bar, based on which indicator is providing it.

    I guess a small difference might be expected, but sometimes it's quite large, for example delta of +2000 vs -1000 in a 5 range bar on ES.

    Would there be any expected reason why this would be so? I would have thought no. I just wanted to check I'm not missing anything obvious.

    Thanks.

    #2
    Hello pjsmith,

    Just to confirm, this inquiry is for NinjaTrader 8 Beta and not for NinjaTrader 7, is this correct?

    For future reference, I am including a link to the NinjaTrader 8 Beta section of the forums where these inquiries should be directed.

    http://ninjatrader.com/support/forum...splay.php?f=60
    http://ninjatrader.com/support/forum...splay.php?f=59

    You are saying that using AddDataSeries(Instrument.FullName, BarsPeriodType.Tick, 1, MarketDataType.Ask); and viewing each OnBarUpdate does not produce the same updates as a different script that instead uses TickReplay and prints each update for OnMarketData() when the current last matches the previous ask, is this correct?

    (I want to be sure you are not adding the ask and bid 1 tick series and also enabling tick replay at the same time.)

    (The last part where the current last must match the previous ask, is shown in the TnSPrints example i've made for NT7.
    http://ninjatrader.com/support/forum...730#post473730)

    Do you have a simplified script that can demonstrate this?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Sorry about that. Yes. NT8 Rc1.

      I have 2 versions of some code that provides per bar delta. 1 works by adding a 1 tick series to the chart (thought the chart on both is a 5 range bar) and uses onbarupdate and reading the ticks, the other works by sampling the ticks via onMarketData. If I add both indicators to the same NT8 5 range es chart with tick replay enabled, I get somewhat different results on some bars on the 2 indicators.

      If there is no expectation of this, I will dig further. As far as I can see, this is really the only difference as I cut n pasted the calc code from the same indicators. It uses uptick / downtick to determine bid/ask on both.

      Thanks,

      Comment


        #4
        Hello pjsmith,

        I was not able to see any simplified example scripts attached to your post.

        Also, can you confirm that you are counting ticks in OnMarketData correctly as the TnSPrints example shows?

        Last, instead of measuring the ticks per bar, can you print the time of each tick and volume and see if these match / are similar?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          No, I will have to code that First, I just wanted to check that you would expect up/down volume from a 1 tick series and tick replay on the same 5 bar range chart to be the same?

          If that be the case, I will build a test case indicator to verify

          Comment


            #6
            Hello pjsmith,

            From my understanding Tick Replay is built from ask, bid, and last tick data.

            I am expecting that as these are printed in historical data, they would have the same (or very similar) timestamps and volume.

            However, once we are able to see the 1 for 1 comparison, if the data is very different I can get clarification from our development on whats going on and what to expect (and if there is an issue).
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by pjsmith View Post
              Sorry about that. Yes. NT8 Rc1.

              I have 2 versions of some code that provides per bar delta. 1 works by adding a 1 tick series to the chart (thought the chart on both is a 5 range bar) and uses onbarupdate and reading the ticks, the other works by sampling the ticks via onMarketData. If I add both indicators to the same NT8 5 range es chart with tick replay enabled, I get somewhat different results on some bars on the 2 indicators.

              If there is no expectation of this, I will dig further. As far as I can see, this is really the only difference as I cut n pasted the calc code from the same indicators. It uses uptick / downtick to determine bid/ask on both.

              Thanks,
              I would suggest analyzing the time stamps when you see the differences. There are some variations in how the data may be processed should multiple ticks share the same timestamp. If you're using the AddDataSeries() method, it is the subject of the primary bars input for when the 1-tick series is called. Whereas tick replay runs independently from the primary bars input.

              http://ninjatrader.com/support/helpG...meFrameObjects
              MatthewNinjaTrader Product Management

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by levikNT, Today, 04:39 AM
              1 response
              12 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by chartish, Today, 08:36 AM
              2 responses
              14 views
              0 likes
              Last Post chartish  
              Started by login_dejavu, Yesterday, 04:58 AM
              1 response
              14 views
              0 likes
              Last Post NinjaTrader_RyanS  
              Started by NinjaTrader_PaulH, Today, 07:40 AM
              0 responses
              4 views
              0 likes
              Last Post NinjaTrader_PaulH  
              Started by awesometrader, Today, 06:59 AM
              2 responses
              9 views
              0 likes
              Last Post awesometrader  
              Working...
              X