Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT7B8 optimiser bug: optimisation of doubles not working properly

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

    NT7B8 optimiser bug: optimisation of doubles not working properly

    Hello,

    the optimiser only shows one line in the Optimizer tab of the SA when you optimise a parameter that is a double and an Enum is defined as a property in the NinjaScript.

    In order to make this clear I have created a couple of versions of the SampleMacCrossOver strategy to illustrate the problem. The first one is called "SampleMACrossOverWithDoubleAndWithoutEnum.cs" and it contans a dummyDouble as parameter and an internal Enum (that is not shown in the properties). None of these two variables are used in the strategy logic since they were created to reproduce the problem. If you try an optimisation on this strategy it works fine. You can do it for all parameters, the dummyDouble or the previously existing Slow and Fast parameters.

    The second file attached is called "SampleMACrossOverWithDoubleAndEnum.cs". It is exactly the same strategy as the first file but the Enum is visible now as a property. If you try to optimise on slow or fast it will work fine since they both are Integers. However, if you try to optimise on the dumyDouble you will see that NT7B8 will run the optimisation as usual but in the Optimizer tab it will only show one row as optimisation result instead of the 10 rows it should show if it is asked to keep the 10 best results. You will probably need to run 2 times the optimisation on dummyDouble since the first time usually works ok, however the second time you try to optimise on dummyDouble it will systematically show only one row in the Optimizer tab of the Strategy Analyzer. I attach a screen capture to show the optimisation parameters I used and the results I obtained.

    Can you please have a look and let me know if you are able to reproduce? By the way, this was working worrently in NT7B2 and stoped working since then.

    Thanks for your help.
    Attached Files

    #2
    We will look into this early next week.
    RayNinjaTrader Customer Service

    Comment


      #3
      The problem is that enums are not supported by NT. In fact they never had been. With NT6.5 it might or might not have worked.

      However, next update of NT7 will come with a code change so your sample would work.

      Comment


        #4
        Hello Dierk,

        thanks for the answer and for getting this fixed in the next release.

        However, your comment stating that Enums are not supported worries me. For NT6.5 there is a reference sample posted in the forum explaining how enums can be used. You will find the reference sample in the link below:



        So, how can there be a reference sample published in for NT6.5 and Enums not being officially supported?

        I can understand that you cannot optimise on Enums, and I have no problem with that. However, in my opinion, the optimiser and other NT functionality should be enum proof and continue working properly when an Enum is defined as a strategy input parameter.

        Enums can be very useful to be used as switches between different options in a strategy. I agree that they could be implemented with an integer as well, but imagine a parameter with 8 different options: it is very different to have a string tag in an enum explicitly saying what each option is rather than having to remember every time the association between the integer value and the actual meaning.

        I would appreciate some clarification on my questions above and, if NT position is still that Enums are not supported, I would like to suggest this as a feature candidate.

        Best regards,

        Comment


          #5
          In NT6.5 you could not optimize on enums and you still can not with NT7. We'll run some tests to see if NT7 optimizer is enum proof.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          599 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          344 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          558 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          557 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X