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

Continuum Server data delayed

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

    Continuum Server data delayed

    After Switching from Rithmic to Continuum I am seeing my data delayed.(CL 11-16) I am having ordersrejected and not filled that shouldn't be because what I see on my charts is not lining up with where the market actually is.

    Does anybody have some already written code that checks each new ticks time stamp against the PC clock ( mine is set to automatically be synced with a Nist Pool of servers)
    and prints out an error message when the delay is say greater than 1 second.

    I am open to any comments as well

    Thanks
    Jerry

    #2
    Helllo JerryWar. and thank you for your questions.

    To answer your second question first, in NinjaScript, Time[0] is the time NinjaTrader has posted for your latest bar, and DataTime.Now is Microsoft MSDN code that pulls from your system's clock. So this should suffice,

    Code:
    i[FONT=Courier New]f (State != State.Historical) // comment this out for NinjaTrader 7
    // if (! Historical) // comment this out for NinjaTrader 8
    {
        Print("Bar " + CurrentBar + " time: " + Time[0].ToString());
        Print("Windows system time: " + DateTime.Now.ToString());
    }[/FONT]
    NinjaTrader is supposed to be pulling from your computer's clock, so if it is in sync with an NIST pool, this is likely not the cause of what you were observing.

    If you look in your (My) Documents\NinjaTrader (7 or 8)\traces folder, you will see a file that has your data provider's name in it. If you look in the most recent of these files, you will find a URL to a rithmic server.

    I will use cqgtrader.com as an example. If you can not find a url in the file I mentioned that is okay, you can use this example URL.

    I would like you to press the Windows key (to the left of your space bar) and the letter r at the same time. Please then type
    cmd
    into the window that pops up and press enter. In the window that comes up, please type

    tracert cqgtrader.com

    replacing the url I put in italics with the URL of your data feed provider's server we discussed earlier.

    If you see many hops time out, or if you see delays with numbers in the thousands (delays are in miliseconds, so a delay of 1000 is 1 second), then you will need to work with your ISP to get a faster connection to your new data server.

    If your connection to your data feed provider is fast, then we have isolated the cause to Ninja's performance. Please follow these performance tips to get you up and running as quickly as possible.

    First, please press ctrl + shift + esc at the same time, click the word "more details" if it shows up (if it does not, we'll continue), navigate to the details tab, find your NinjaTrader.exe process, right click it, and select Set Priority -> High.

    Second, in a new or running chart, in the Indicators dialog (hover over the buttons on the top toolbar until you see the word "Indicator", then select that button), select every indicator in your chart, look for the "Calculate On Bar Close" property, and set it to "true"


    Finally, right-click in the same chart, selected "Properties", and set the "Display update interval (sec)" to "1.0" (it was 0.5)


    These optimizations, and many more, can be found in the Performance Tips page of the Help Guide.




    Please let us know if there is any other way we can help.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      Hi Jessica thanks for responding.

      1)
      I have been told before that Ninjatrader is pulling from the PC Clock. I believe this is false.
      Close Ninja
      Set back the clock 30 minutes on your PC
      ReOpen and Connect.

      Watch the new data as it comes in. You will see it time stamped 30 minutes ahead of your PC so the data is using its own time Stamps.

      2) I did a tracert to CQGTrader.com it gets seven hops to Cleveland and does not return anymore pings. but it got to Cleveland in 30ms.
      I did a tracert to Rithmic.com and it got there in 42ms with a couple of routes that did not return pings.
      My connection is not the problem.

      3) I run and I7 Quadcore with flash drive. It screams. I am only running 5 charts.
      my CPU hovers around 3 percent usage occasionally jumping to 12 percent when alerts
      and sound trigger.

      Thanks for the snippet. I need to alter it to compare the times so I only print when the times are out of whack. If I remember right the format is strange so I will have to look into that.

      I had some connection issues when using Rithmic but never saw the kinds of delays I now see with CQG.


      Jerry

      Comment


        #4
        You are correct about C#'s time being unusually formatted, they do not adopt the strftime convention. I am positing some publicly available documentation on their ToString method which contains Microsoft's custom time formatting strings.

        Learn how to use a standard date and time format string to define the text representation of a date and time value in .NET.
        Jessica P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by sightcareclickhere, Today, 01:55 PM
        0 responses
        1 view
        0 likes
        Last Post sightcareclickhere  
        Started by Mindset, 05-06-2023, 09:03 PM
        9 responses
        258 views
        0 likes
        Last Post ender_wiggum  
        Started by Mizzouman1, Today, 07:35 AM
        4 responses
        18 views
        0 likes
        Last Post Mizzouman1  
        Started by philmg, Today, 01:17 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_ChristopherJ  
        Started by cre8able, Today, 01:01 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X