Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DOM & CHART Sync

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

    DOM & CHART Sync

    Tonight I saw something very strange on the NTBrokerage connection. Gold seemed to get very volatile so I started a trade SHORT, but the DOM actually started to rise but the Chart was still in a down trend. I have captured something a bit later to show the two prices are not synced properly. Almost like they have 2 different data streams as they simply didn't correlate.

    The chart has "Tick Replay" enabled if that makes a difference.
    Attached Files
    Last edited by NJA_MC; 07-20-2015, 03:24 PM.

    #2
    How long did you experience the out sync behavior? As you're aware NT8 is multi threaded so it is possible that different threads process data more quickly than others if they don't have a lot of processing load. But I would expect that data correlates in the end and I also expect data to not be that far out of sync unless you had a serious performance issue going on one of the threads.

    If you run into this again please look at time stamps of the chart to see if they appear to be keeping up with the local time on your PC(Note that most providers use server time stamps). Please also open task manager and monitor the load on all CPU cores and I also suggest opening up a T&S window which has the time stamps of the ticks so we can compare against the chart.

    Hopefully this will lead us in the right direction then we can identify the problem window and then work to isolate is it custom NS causing the issue or Tick Replay / NT.

    If its reproducible for you on a nightly basis I may also look to setup in house tests and get a copy of your setup.

    Comment


      #3
      Brett,

      It was likely the Chart was running behind the DOM as I did place an order on the market and got stopped out, and the order markers showed on the chart suck to the right-hand edge (at a price the DOM was at, but not the chart).

      I believe you are right, there must have been a delay on the chart. That doesn't make me feel real good... If I didn't have the DOM open I would have never known. Not sure why the chart was bogged down, but I would strongly recommend a warning such as a RED background during "Real-time" where the painted bar is not within a second or two of "DataTime.Now" or some similar notification.

      I will keep an eye of for this in the future. I may need help getting Playback working as I am still having trouble with that connection type, but might be worth downloading the Gold Crash day and trying this again. I don't know if there was high volume and/or high volatility last night with that move.

      Comment


        #4
        Some minor delays in processing between threads could be expected (less than about a second). More major delays in processing is not expected and we needed to look into. You could have the same issue with NT7 the differencing being that the entire application would bog down vs just a few of the windows on that thread like NT8.

        Please note:

        * We are in beta and still have not concluding all performance improvements on the product itself. Therefore we are still making progress on performance which ultimately will help. In the case any cases I can provide to development to specifically look into for performance gain will help.
        * Could be that your custom code in your indicators has a heavy cost code in it that is taking a long time to process. Which is why the chart is bogged down.

        Which means we needed to keep peeling back the onion to find the actual cause. Can you please send me your workspace to support [at] ninjatrader [dot] com ATTN" Brett so I could setup a test with your workspace (but non of your indicators to see if I can reproduce an issue there or not and we could go from there.)

        Comment


          #5
          Feature request

          Hi Brett,

          The workspace is off to you.

          I am sure the indicators may have slowed the system as it doesn't seem like NT8 is leveraging "common" instances of classes.

          I have 4 sets of indicators pulling data from a master indicator (very computationally intensive & data intensive). I thought in NT7 it seemed like this master indicator was shared (so one instance existed since all the parameters were the same) and the other indicators simply called that same instance. It isn't clear to me that NT8 is doing the same. So that means 4 of these intensive indicator cores are running in the background and could delay ticks under "heavy L1 & L2" traffic times. I can see coders creating this issue and not knowing that it has happened. My issue is more that I didn't know it was happening, only because I had a DOM open on the same instrument and tried to play an order did this become visible.

          This transparent timing failure is likely to happen to others (and me) in the future. We need a warning from NT8 that it senses a delay.

          FEATURE REQUEST: Chart changes color, or prints warning across chart that chart is "LAGGING MARKET". This can be a red background or printing on the screen. This should be triggered if the painted "realtime" bar has a significantly different time stamp from "NOW". I am sure there is some things that need to be done for Playback not to trigger this feature.

          Comment


            #6
            Thanks I got the workspace.

            I suspect I won't be able to reproduce since I don't have your complex indicator but should give me a good frame of reference to see what demand your placing on NT and look into it from that angle.

            As to your feature request likely will not be implemented at the platform level since we looked into this a while back and its just not possible to detect in all scenarios and the detection method just won't work reliably with all providers. There would be many false positives due to users clocks not being in/out sync therefor its just not feasible as a platform feature at this time.

            Comment


              #7
              Originally posted by NinjaTrader_Brett View Post
              As to your feature request likely will not be implemented at the platform level since we looked into this a while back and its just not possible to detect in all scenarios and the detection method just won't work reliably with all providers. There would be many false positives due to users clocks not being in/out sync therefor its just not feasible as a platform feature at this time.
              Brett,

              This is a painful realization of a possibility. I will try to put some thoughts together as we need something in the LOG file or chart to indicate a LAG. This might explain why in the past it seemed like I couldn't keep up with the market.

              It seems like upon connecting to the data provider an "error" can be calculated an placed in that "connection", this value can be used to calculate the "NOW" time based upon the bar time painted to detect this offset in time. Maybe this time lag setting can be manually set for example if you are not scalping, but you have a very large calculation to enter/exit, a few second lag might be okay, but scalping 1 sec (I wouldn't expect any better) might be of significant concern. Maybe this feature is only enable on demand by programmer so it doesn't effect the general user.

              Just my plea for help in determining too long a computation time or too high a load on the CPU.

              Thanks for your teams consideration. Maybe this can wait until after the initial release but I feel it is really needed.

              Comment


                #8
                Feature request

                This raises an interesting somewhat related matter: computer clock synchronization with "real time". I recently noticed 1 minute bar updates in my "real time synchronized" code occurring on 1 minute DataSeries at about 40 seconds past the minute, essentially 20 seconds earlier than I expected them. It made me realize that my PC clock was about 20 seconds slow in relation to real time. I had set it up to sync with a time server, but for some reason, the syncing had not been occurring.

                Would it be possible for NT8 to detect variance from real time greater than a settable amount (default, 2 seconds?), based on local PC regional settings and a global time reference? A warning at startup, perhaps, could advise of the need to check the PC clock and resynchronize with a time reference, if need be.

                Just a thought. Thanks.
                Multi-Dimensional Managed Trading
                jeronymite
                NinjaTrader Ecosystem Vendor - Mizpah Software

                Comment


                  #9
                  Jeronymite: http://www.thinkman.com/dimension4/
                  eDanny
                  NinjaTrader Ecosystem Vendor - Integrity Traders

                  Comment


                    #10
                    Feature request

                    Thanks, eDanny. Interesting. I have already done my own coding to do this, so it is of interest only.

                    As for NT8, I believe it would be useful for it to have a clock-time accuracy test and a popup warning when the clock time varies from "real" time by more than a certain (settable) amount.

                    Thanks.
                    Multi-Dimensional Managed Trading
                    jeronymite
                    NinjaTrader Ecosystem Vendor - Mizpah Software

                    Comment


                      #11
                      Hi jeronymite, eDanny, NJA_MC,

                      I have submitted your suggestion to the development team for consideration.
                      <span class="name">Alex C.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

                      Comment


                        #12
                        Feature request

                        Just seeking an update on this. Thanks.
                        Multi-Dimensional Managed Trading
                        jeronymite
                        NinjaTrader Ecosystem Vendor - Mizpah Software

                        Comment


                          #13
                          Hi jeronymite,

                          This has not been implemented as of yet. The tracking number for this issue is SFT-591.
                          <span class="name">Alex C.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by alifarahani, Today, 09:40 AM
                          6 responses
                          33 views
                          0 likes
                          Last Post alifarahani  
                          Started by Waxavi, Today, 02:10 AM
                          1 response
                          17 views
                          0 likes
                          Last Post NinjaTrader_LuisH  
                          Started by Kaledus, Today, 01:29 PM
                          5 responses
                          14 views
                          0 likes
                          Last Post NinjaTrader_Jesse  
                          Started by Waxavi, Today, 02:00 AM
                          1 response
                          12 views
                          0 likes
                          Last Post NinjaTrader_LuisH  
                          Started by gentlebenthebear, Today, 01:30 AM
                          3 responses
                          17 views
                          0 likes
                          Last Post NinjaTrader_Jesse  
                          Working...
                          X