Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT7 Indicator/Strategy Performance Issues

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

    NT7 Indicator/Strategy Performance Issues

    I've been experiencing extremely poor performance with a strategy in NT7 Beta 14. The strategy is quite simple but it uses a custom indicator that is a little complicated.

    I did a test to compare the performance between NT7 and NT6.5. I ran an optimization for the exact same strategy, instrument and time frame for 20 iterations. The results were as follows:

    NT 6.5 took around 1min 23s per iteration and a total time of just under 28min to complete the optimization.

    NT7 took anywhere from 2min 52s up to 14min 44s per iteration. It took NT7 a total of 2hr 52min to complete the optimization.

    Needless to say, I was shocked with these results. NT6.5 was over 6 times faster than NT7!!!

    I need some help in order to figure out what is going on here. Are there some serious flaws in NT7? Can my code be changed to speed things up? I don't even know where to begin in order to trouble shoot this.

    Please help!

    CS

    #2
    cshep,

    Please post the indicator and your test strategy/setup. Thank you.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks Josh, I will send my indicator/strategy and setup details to you in a private message.

      Comment


        #4
        For some reason I am unable to send an attachment through a private message.

        Is there another way I can get this information to you?

        Comment


          #5
          cshep, you can email support at ninjatrader dot com attn 'NT7 ticket 310773, thread 28571'. Thank you.
          AustinNinjaTrader Customer Service

          Comment


            #6
            We have received your code and will be reviewing it and getting back to you shortly.
            AustinNinjaTrader Customer Service

            Comment


              #7
              cshep, I ran the optimizer from 1/1/10 to 4/26/10 on 1 minute ES 06-10 on the deviation value from 80 to 100 with a step of 1. Session template was <use instrument settings>. The optimization took roughly 80 seconds with NT7.

              With NT6.5 running all the same settings, the optimization took roughly 20 seconds.

              This confirms your findings and I will send a note along to development to see if they have anything to add.
              AustinNinjaTrader Customer Service

              Comment


                #8
                I am quite interested to see what the cause of the performance discrepancy is and how it can be improved.

                However, even with this issue I am amazed at the results you are getting. 80sec with NT7! That's outstanding.

                I am running a a 3GHz Pentium 4 HT (dual core) with Windows XP and 4GB ram. When I run the same optimization that you did, it takes almost 2hrs.

                What type of system are you running that can complete this test in 80sec?


                Thanks,

                CS

                Comment


                  #9
                  Originally posted by cshep View Post
                  I am quite interested to see what the cause of the performance discrepancy is and how it can be improved.

                  However, even with this issue I am amazed at the results you are getting. 80sec with NT7! That's outstanding.

                  I am running a a 3GHz Pentium 4 HT (dual core) with Windows XP and 4GB ram. When I run the same optimization that you did, it takes almost 2hrs.

                  What type of system are you running that can complete this test in 80sec?


                  Thanks,

                  CS
                  Our standard issue PC our DELL laptops, 2 - 4 GB RAM, nothing special. We are looking into this scenario though.
                  RayNinjaTrader Customer Service

                  Comment


                    #10
                    Cshep,

                    you have a region in your indicator:

                    Code:
                     
                    if (WaveCount() < 5) return;
                    else if (WaveCount() == 5)
                    {[INDENT]init += 1;
                    if (init == 1)[INDENT]{
                    double b = MAX(High, CurrentBar)[0] + TickSize;
                    double s = MIN(Low, CurrentBar)[0] - TickSize;
                    BStop.Set(b);
                    SStop.Set(s);
                    return;
                    }
                    [/INDENT][/INDENT]}
                    please include folowing two fields in your "Variables" section:

                    Code:
                     
                    private double hh = 0;
                    private double ll = double.MaxValue;
                    and modify your existing region to avoid CurrentBar inside MIN MAX indicators:

                    Code:
                     
                    if (WaveCount() < 5)
                    {[INDENT]ll = Math.Min(ll, Low[0]);
                    hh = Math.Max(hh, High[0]);
                    return;
                    [/INDENT]}
                    else if (WaveCount() == 5)
                    {[INDENT]init += 1;
                    if (init == 1)
                    {[INDENT]double b = hh + TickSize;
                    double s = ll - TickSize;
                    BStop.Set(b);
                    SStop.Set(s);
                    return;
                    [/INDENT]}
                    [/INDENT]}
                     

                    After I made these changes optimization ran about 20 secs on both 6.5 and 7

                    Let me know if that helps.
                    ArtSenior Software Developer

                    Comment


                      #11
                      Wow!

                      This small change made a huge difference. My optimization completed in 1min 43sec. Thank you!

                      This leaves me with a couple questions:

                      1. What is the lesson here? Should I not use the "MAX()" function in future indicators? Are there other functions I should "avoid?"

                      2. How can I troubleshoot the performance of my own indicators? I never could have resolved this on my own.


                      Thanks,

                      CS

                      Comment


                        #12
                        Originally posted by cshep View Post
                        Wow!

                        This small change made a huge difference. My optimization completed in 1min 43sec. Thank you!

                        This leaves me with a couple questions:

                        1. What is the lesson here? Should I not use the "MAX()" function in future indicators? Are there other functions I should "avoid?"

                        2. How can I troubleshoot the performance of my own indicators? I never could have resolved this on my own.


                        Thanks,

                        CS
                        Cshep,

                        In the coding world there are no situations where something always work or always does not. It all depends on particular task to be completed.
                        There is nothing wrong with MIN or MAX. By passing CurrentBar into parameters you are running into big risk of creating multiple instances of indicator.
                        As your second question - you should always try to isolate the issue by commenting out the parts of your code until you find it.
                        Debugging is always frustrating part of development...

                        Let us know if you need any further assistance.
                        ArtSenior Software Developer

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                        0 responses
                        605 views
                        0 likes
                        Last Post Geovanny Suaza  
                        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                        0 responses
                        351 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by Mindset, 02-09-2026, 11:44 AM
                        0 responses
                        105 views
                        0 likes
                        Last Post Mindset
                        by Mindset
                         
                        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                        0 responses
                        560 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by RFrosty, 01-28-2026, 06:49 PM
                        0 responses
                        561 views
                        1 like
                        Last Post RFrosty
                        by RFrosty
                         
                        Working...
                        X