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.




    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.

              MatthewNinjaTrader Product Management

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by sidlercom80, 10-28-2023, 08:49 AM
              167 responses
              2,260 views
              0 likes
              Last Post jeronymite  
              Started by warreng86, 11-10-2020, 02:04 PM
              7 responses
              1,361 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by Perr0Grande, Today, 08:16 PM
              0 responses
              5 views
              0 likes
              Last Post Perr0Grande  
              Started by elderan, Today, 08:03 PM
              0 responses
              9 views
              0 likes
              Last Post elderan
              by elderan
               
              Started by algospoke, Today, 06:40 PM
              0 responses
              10 views
              0 likes
              Last Post algospoke  
              Working...
              X