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

End of backtest time

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

    End of backtest time

    Hi there,
    I wanna run some code (outside of NT) only after backtest/optimization is finished, after all iterations and instruments. My question is there any way I can get that time when backtest/optimization is done?

    Any suggestions would be greatly appreciated. Thanks.

    #2
    Hello Leeroy_Jenkins,

    Thank you for the post.

    There is currently not any supported/documented means to detect the end of the tests. For a single backtest you could in theory detect that using State.Terminated. Using a bool variable you could set the variable to true in State.DataLoaded to note the script had been started, then in State.Terminated check if the bool is true.

    I will otherwise add a vote to the existing feature request that we have for adding an override to be called at the end of the backtest/optimization. SFT-1610

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

    Comment


      #3
      This feature would be great.
      Thanks.

      Comment


        #4
        Originally posted by NinjaTrader_Jesse View Post
        Hello Leeroy_Jenkins,

        Thank you for the post.

        There is currently not any supported/documented means to detect the end of the tests. For a single backtest you could in theory detect that using State.Terminated. Using a bool variable you could set the variable to true in State.DataLoaded to note the script had been started, then in State.Terminated check if the bool is true.

        I will otherwise add a vote to the existing feature request that we have for adding an override to be called at the end of the backtest/optimization. SFT-1610

        I look forward to being of further assistance.
        Hello Jesse, I'm interested in this feature ...could you tell me about? ...and more could you tell me how to search information about features (requested) with ID (ex. this SFT-1610)?
        Thanks .. Best regards!

        Comment


          #5
          I've made a workaround for this. At the end of the backtest/optimization, NT plays a sound. I use a sound monitor written in C#, and when it makes any sound, it triggers an event that my other program parses optimization/backtest results. So, you can achieve it. If you're interested, I can send you the code. Also, you can modify the code so that it triggers when NT plays a specific sound.

          Comment


            #6
            Originally posted by Leeroy_Jenkins View Post
            I've made a workaround for this. At the end of the backtest/optimization, NT plays a sound. I use a sound monitor written in C#, and when it makes any sound, it triggers an event that my other program parses optimization/backtest results. So, you can achieve it. If you're interested, I can send you the code. Also, you can modify the code so that it triggers when NT plays a specific sound.
            Hello Leeroy .. you had a great idea! Yes please ... waiting a native function I'll be happy to use your great solution! Thanks

            Comment


              #7
              Originally posted by ClauTrade View Post

              Hello Jesse, I'm interested in this feature ...could you tell me about? ...and more could you tell me how to search information about features (requested) with ID (ex. this SFT-1610)?
              Thanks .. Best regards!
              Hello ClauTrade,

              Thank you for your note.

              At this time, there is no way to search for features that have been requested, as feature requests are tracked internally. The internal tracking number is provided to you when a feature request is created on your behalf or when your vote is added to an existing request so you may refer to that tracking number when contacting Platform Support if you ever have questions regarding that feature request. Then we can look it up internally and follow up with you regarding your questions.

              Since you are interested in this feature, I have added your vote to SFT-1610.

              When a feature request is implemented, you'll find a description of the new feature in the release notes (including the tracking ID):Thank you for using NinjaTrader.​
              Emily C.NinjaTrader Customer Service

              Comment


                #8
                I'm not sure if you can use it as part of the NT solution or not. Perhaps you can within an addon. Because you can't use it as part of your strategy code. I used this code as part of a separate WPF app that I developed years ago, so I didn't had that problem. It checks the Windows audio output, and when the ProcessName is equal to "NinjaTrader," NT outputs sound.
                Attached Files

                Comment


                  #9
                  Originally posted by Leeroy_Jenkins View Post
                  I'm not sure if you can use it as part of the NT solution or not. Perhaps you can within an addon. Because you can't use it as part of your strategy code. I used this code as part of a separate WPF app that I developed years ago, so I didn't had that problem. It checks the Windows audio output, and when the ProcessName is equal to "NinjaTrader," NT outputs sound.
                  Great .. Many thanks Leeroy,

                  Check it and I'll let you know ..sure it will be usefull!
                  Wish you the best.

                  Comment


                    #10
                    Originally posted by NinjaTrader_Emily View Post

                    Hello ClauTrade,

                    Thank you for your note.

                    At this time, there is no way to search for features that have been requested, as feature requests are tracked internally. The internal tracking number is provided to you when a feature request is created on your behalf or when your vote is added to an existing request so you may refer to that tracking number when contacting Platform Support if you ever have questions regarding that feature request. Then we can look it up internally and follow up with you regarding your questions.

                    Since you are interested in this feature, I have added your vote to SFT-1610.

                    When a feature request is implemented, you'll find a description of the new feature in the release notes (including the tracking ID):Thank you for using NinjaTrader.​
                    Hello, good morning Emily,
                    I think a few people reads all release note. And more, I found in forum this feature but the request code SFT-1610 started years ago (7/2021) ... I cannot search it reading all released from this date!

                    Will be interesting a public page about the requested codes list with information about description, nº votes, status and link to release note....will be very useful and avoid you, support, to reply to everyone searching info about last features requested.

                    Many thanks and have nice day!

                    Comment


                      #11
                      You can find how long it a ticket has been open by using google. The first mention was on May 16, 2018. Like most requests, it can take years. Some requests from the 00s still haven't been implemented. So it's better not to expect too much

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by ghoul, Today, 06:02 PM
                      2 responses
                      13 views
                      0 likes
                      Last Post ghoul
                      by ghoul
                       
                      Started by jeronymite, 04-12-2024, 04:26 PM
                      3 responses
                      44 views
                      0 likes
                      Last Post jeronymite  
                      Started by Barry Milan, Yesterday, 10:35 PM
                      7 responses
                      20 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Started by AttiM, 02-14-2024, 05:20 PM
                      10 responses
                      180 views
                      0 likes
                      Last Post jeronymite  
                      Started by DanielSanMartin, Yesterday, 02:37 PM
                      2 responses
                      13 views
                      0 likes
                      Last Post DanielSanMartin  
                      Working...
                      X