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

Dataseries order

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

    Dataseries order

    Hello,

    everything is working fine with NT7 but I´m experiencing delay when clicking in the chart or switching in orders-tabs (when using a script with 5 dataseries, 3 x tickdata and 2x Range)

    I want to ask please if it is important which dataseries is doing the calculations in onbarupdate maybe? Now it is dataseries 4 (of 5) First 3 dataseries are ticks.

    I have a lot of lines working with bidask and before testing it this way like a little dog with learning by doing, I want to ask before.

    Add(PeriodType.Tick,300);//1
    Add(PeriodType.Tick,600);//2
    Add(PeriodType.Tick,900);//2
    Add(PeriodType.Range,2);//3
    Add(PeriodType.Range,4);//3

    I do al lot of calculations with Dataseries 4. Should I change it maybe to dataseries1, or doesnt this help with delay and freezing?

    Thank you!
    Tony
    Last edited by tonynt; 04-16-2018, 09:09 AM. Reason: translation

    #2
    Hello tonynt,

    Thank you for the post.

    The order that the series are added will not matter so much as the logic you execute and the frequency that logic is executed.

    Have you at this point tried to comment your logic out to confirm if the problem still exists? It would likely be helpful to identify if some portion of your logic is the reason for the delay, or if this happens in general without using your logic.

    If this is happening in general while just using the data you mentioned, this could potentially be the computer performance otherwise if your logic is required it is likely the logic causing the slowdown. Addressing the specific logic causing the slowdown will help determine if moving it to a different BarsInProgress will affect your trading goals. I really couldn't say what may need to be modified from what you have provided only that more debugging would be needed to isolate the problem.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hello Jesse,

      thank you for your reply So what I understand from this is that it is not important if the calculations are in dataseries1 or 4.

      Next question please. When running the logic in an indicator that gives an output value which I will use in the script-strategy and use that indicator with the dataseries will be different for slowdown? compared to do the calculations directly in the script strategy?

      I have done now in the script because I thought its better to have it calculated directly in the strategy.

      For your Information, I have an indicator done by a programmer providing bids and asks each bar of the dataseries used with cobc false. On this I have built all calculations but ist slowing down NT.

      Would it help - for any reason - to calculate it as an indicator and provide the output value for the script?

      Thank you!
      Tony
      Last edited by tonynt; 04-16-2018, 10:51 AM. Reason: translation error

      Comment


        #4
        Hello tonynt,

        Thank you for the reply.

        So what I understand from this is that it is not important if the calculations are in dataseries1 or 4.
        No this is still very important. I had mentioned that the platform doesn't care what order your series are added, it just calls the OnBarUpdate override when appropriate. How that, in turn, executes your logic will matter and will change the outcome so this is something you would need to take into account.

        I had mentioned that the frequency your logic is called can take a toll on performance so this is also something you need to look at. Before continuing further, I suggested that debugging is likely needed to identify if this is related to a portion of your logic you used and frequency its called or the plaform/pc performacne in general.

        If you know this is related to the logic used, by all means please experiment with changing the BarsInProgress used to execute the logic. This would also be a valid way to determine if that affects the slowdown or not. Really this is a subject you will need to test on your specific PC to see if the changes affect the slowness.

        Next question please. When running the logic in an indicator that gives an output value which I will use in the script-strategy and use that indicator with the dataseries will be different for slowdown? compared to do the calculations directly in the script strategy?

        I have done now in the script because I thought its better to have it calculated directly in the strategy.
        I couldn't really answer this question as this really depends on how the indicator was created along with other variables I dont have. Generally speaking there is not a specific difference between a strategy and indicator in regard to running math calculations. I could suggest for performance related questions like this that you try each way to see if one works faster than the other. Indicators do have the ability to plot and do other more complex renderings so that could be a cause of the slowness.


        For your Information, I have an indicator done by a programmer providing bids and asks each bar of the dataseries used with cobc false. On this I have built all calculations but ist slowing down NT.

        Would it help - for any reason - to calculate it as an indicator and provide the output value for the script?

        If the custom syntax is causing slowness in general, it would not likely help to move the code into an indicator versus a strategy. If the code can be slow, it likely will be anywhere it is run. This would be considered a performance item and is something the developer would need to debug to see what is impacting performance and if that can be resolved. This could be due to the logic that is used being inefficient or it could also be that it is efficient but the PC used cannot handle that calculation.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Hello Jesse,

          thank you again for your reply. I have the plotting - you mention referring to the indicator - also in my script. What about plottings please? I remember I read somewhere in a thread that plotting uses a lot of cpu? Is this correct? Is there a difference if I use DrawTextFixed or plotting lines, rectangels, dots...

          Thank you for your support!
          Tony

          Comment


            #6
            Hello tonynt,

            Thank you for the reply.

            If you are doing a lot of rendering in general that can take a toll depending if the PC can handle what you are doing. There is not really anything specific I can reference here, this is more of a general PC concept for anything that renders really. If what you are rendering is very complicated or takes a lot of CPU power it will be inherently slower than something that does not render at all.

            This is a topic which you should experiment with on your end on the PC you will be using. Testing with and without plotting from your indicators, and with/without using Drawing tools. If that is part of the problem it should be pretty obvious when they are removed if so. If they are not part of the problem, you likely won't see any performance gains.

            Performance related questions can be difficult because they really come down to what logic is being used and the PC being used. The platform is only capable of taking instructions from the script, the result of those instructions can be good or bad depending on what was done in the logic. If this is still referring to the script you had purchased, a dialog with the developer will likely be more helpful than trying to identify the problem on the forum here.

            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by WeyldFalcon, 08-07-2020, 06:13 AM
            10 responses
            1,413 views
            0 likes
            Last Post Traderontheroad  
            Started by firefoxforum12, Today, 08:53 PM
            0 responses
            9 views
            0 likes
            Last Post firefoxforum12  
            Started by stafe, Today, 08:34 PM
            0 responses
            10 views
            0 likes
            Last Post stafe
            by stafe
             
            Started by sastrades, 01-31-2024, 10:19 PM
            11 responses
            169 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by kmunroe478, Today, 05:39 PM
            0 responses
            6 views
            0 likes
            Last Post kmunroe478  
            Working...
            X