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

Optimization Error while displaying values

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

    Optimization Error while displaying values


    I'm having an issue here where the optimization results differ from the top window to the bottom, as you can see, total net profit is $0.00 above and $135.21 below.

    I'm wondering how can I troubleshoot this issue, didn't find anything relevant while googling, would appreciate your support.

    Regards,

    Click image for larger version

Name:	image.png
Views:	151
Size:	62.9 KB
ID:	1243341

    #2
    Hello Waxavi,

    May I confirm you are able to reproduce this using the latest release of NinjaTrader 8.1.1.3?


    Are you able to reproduce this behavior using the SampleMACrossover included with NinjaTrader while using 8.1.1.3?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello ChelseaB,

      I have currently the 8.0.27.1 64-bit version

      This behavior doesn't happen using SampleSMACrossover

      I will try again with the latest version and let you know also

      Thank you

      Comment


        #4
        Hello ChelseaB, would it be possible to assist me without upgrading to the last version just yet?

        Comment


          #5
          I can confirm the same error on the most current ( downloaded today) version of ninja trader. I work with Waxavi. This is across Multiple computers

          Comment


            #6
            Hello Waxavi,

            If the behavior does not occur with the SampleMACrossover this would imply there is an issue in the code of the script.

            If you comment out all code and use a simple entry and stop, does the behavior still occur?

            kpoulis,

            Welcome to the NinjaTrader forums!
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Hello ChelseaB,

              The code base is fairly long, so it would take me a while to pinpoint the main cause, I'll get back to you as soon as possible. Having said this, I think it doesn't make sense the strategy could affect the optimization layout this way.

              Regards,

              Comment


                #8
                Originally posted by NinjaTrader_ChelseaB View Post
                kpoulis,

                Welcome to the NinjaTrader forums!
                Thank you!

                Do you think we can get a resolution

                Comment


                  #9
                  Waxavi The image you posted initially shows all entries in the top of the display being the same; namely, looking as if they are all "zero" or "initial values". Do the details in the bottom section also vary for all the other entries above?

                  NinjaTrader_ChelseaB When you say "this would imply there is an issue in the code of the script", please provide more detail to substantiate this. Do you have an example that can produce that effect? Can you give examples of the types of code that would do that?

                  Without knowledge of the "under the hood" code in the platform, it is hard to say what exactly is happening, but it seems fair to say that it would seem "extremely unlikely" (though perhaps not impossible) that strategy code could cause platform code to be so completely at odds and inconsistent in itself.

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

                  Comment


                    #10
                    Hello jeronymite,

                    I'm still trying to pinpoint the cause of this issue, but indeed I don't think the code should hinder the proper behavior of optimization results, and if it does, the log should tell me something.

                    Regards,

                    Comment


                      #11
                      Hello jeronymite,

                      If the version is the latest release 8.1.1.3 and the SampleMACrossover is not able to reproduce, that would imply something in the script is triggering the behavior.

                      It would be necessary to reduce and find the specific code causing the issue. A simple test would be to just comment out all the logic and place a simple entry and exit and make sure that works first.
                      Chelsea B.NinjaTrader Customer Service

                      Comment


                        #12
                        NinjaTrader_ChelseaB Yes, that's logical. But the fact that a script can cause this behaviour at all implies a design flaw in the underlying platform code. It would be good to know what specific script code manifests the behaviour, but the fact remains that the behaviour should not occur, regardless of what's in a script, and it represents an as-yet-unknown bug in the platform.

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

                        Comment


                          #13
                          Hello jeronymite,

                          Not all C# is valid logic.

                          Try adding the following to a script:

                          while (true) Print("Hello");

                          In one line you will have broken NinjaTrader. There would nothing the developers can do to stop bad logic from being coded into a script.
                          Chelsea B.NinjaTrader Customer Service

                          Comment


                            #14
                            Hello ChelseaB,

                            I can certify this issue disappears if I set IsInstantiatedOnEachOptimization to true, therefore it might be a private variable in memory or something similar.

                            Still looking to narrow it down.

                            Regards,

                            Comment


                              #15
                              Hello Waxavi,

                              When using IsInstantiatedOnEachOptimization as false, may I confirm that all variables are being instantiated / reset in State.DataLoaded?
                              Chelsea B.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by algospoke, 04-17-2024, 06:40 PM
                              6 responses
                              48 views
                              0 likes
                              Last Post algospoke  
                              Started by arvidvanstaey, Today, 02:19 PM
                              4 responses
                              11 views
                              0 likes
                              Last Post arvidvanstaey  
                              Started by samish18, 04-17-2024, 08:57 AM
                              16 responses
                              61 views
                              0 likes
                              Last Post samish18  
                              Started by jordanq2, Today, 03:10 PM
                              2 responses
                              9 views
                              0 likes
                              Last Post jordanq2  
                              Started by traderqz, Today, 12:06 AM
                              10 responses
                              18 views
                              0 likes
                              Last Post traderqz  
                              Working...
                              X