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

How to backtest multiple strategies elegantly?

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

    How to backtest multiple strategies elegantly?

    Hi,

    I have 3 strategies that use the same main instrument. I want to backtest them all together to see how they perform jointly. They trade at different periods of the day and use different conditions and additional instruments to enter and exit.

    To keep my code clear, I prefer to keep 3 different classes (and 3 files)

    I could group them into a new strategy but I'd have to copy paste the code of each strategy.

    Is there a way to make it more efficiently? My guess would be to create a new strategy that imports all the other ones but I can't see precisely how to do it.

    Thanks


    #2
    Hello Vincere,

    There is not a way to automatically backtest multiple strategies at the same time. Each backtest would need to be started manually.

    I will submit a feature request on your behalf for the NinjaTrader Development to consider allowing a way to automate backtesting with multiple different strategies simultaneously.

    Once I have a tracking ID for this request I will post in this thread for future reference.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      I'm interested in this too! I've been thinking about how to do this for the past couple weeks, Vincere read my mind.

      Comment


        #4
        Not exactly what you looking for but you could move your signal logic to three different indicators. Then add all the necessary data series to one strategy and and call each indicator(signal logic) from that one strategy using the correct BarsInProgress and enter the market using the correct BarsInProgress for that logic.

        Comment


          #5
          Hello Vincere,

          I've received tracking ID #SFT-2193 for this request to automate backtesting with multiple strategies.

          avy_says I have submitted your vote as well.

          Please note it is up to the NinjaTrader Development to decide if or when any request will be implemented.

          We appreciate the feedback on this.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            I am also interested in having the ability to batch process optimizations.

            Comment


              #7
              Hello cupir2,

              I've added your vote to SFT-2193.

              Thanks for your input.
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Hi, any update on this function?

                Comment


                  #9
                  Hello kahei626,

                  SFT-2193 has not been implemented at this time.

                  Please note, we receive many requests and cannot reasonably implement all requested features or changes. Interest is tracked internally and if enough interest is tracked, it would be weighed against how feasible it would be to make those changes to consider implementing, so we cannot offer an ETA or promise of fulfillment.

                  When new features are implemented, they will be listed in the Release Notes page of the Help Guide. The ID number may be different than the internal feature request tracking ID, but the description of the feature will let you know if that feature has been implemented.

                  Release Notes - https://ninjatrader.com/support/help...ease_notes.htm
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #10
                    Any further updates on this feature? Seems to be on the best ways to ensure that the most robust parameters are chosen.

                    Comment


                      #11
                      Hello Akotic,

                      SFT-2193 has not been listed in the release notes of the help guide at this time.
                      Chelsea B.NinjaTrader Customer Service

                      Comment


                        #12
                        Any updates here?, is there a way we can see the StrategyOptimizer class code. I need something to test multiple strategies in batch very badly.

                        Comment


                          #13
                          Hello eramosr21,

                          Thanks for your note.

                          This feature request has not been implemented into NinjaTrader 8 at this time.

                          Deciding on features for future releases is not a simple black-and-white decision. There are many factors involved including but not limited to:
                          • Demand which is measured by objective user requests and subjective discretion on the part of our Product Management team.
                          • Feasibility
                          • Developer bandwidth
                          • Current projects in the queue
                          • Economics
                          You'll find a note regarding your feature request in the release notes when a feature is implemented.

                          Let me know if I may assist you further.​​
                          Brandon H.NinjaTrader Customer Service

                          Comment


                            #14
                            It will be very logical - to implement this feature of batch testing, because NinjaTrader has **very advanced** set of optimization parameters, and adding batch testing with the possibility of fully automated autooptimization can accelerate backtesting, thus can greatly improve trading results.
                            Besides, in MT4-MT5 batch testing is already implemented.
                            Batch testing discussed several times here on forum:

                            https://ninjatrader.com/support/foru...tch-processing

                            Last edited by AlexEro; 12-04-2022, 11:23 PM.

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by bortz, 11-06-2023, 08:04 AM
                            47 responses
                            1,602 views
                            0 likes
                            Last Post aligator  
                            Started by jaybedreamin, Today, 05:56 PM
                            0 responses
                            8 views
                            0 likes
                            Last Post jaybedreamin  
                            Started by DJ888, 04-16-2024, 06:09 PM
                            6 responses
                            18 views
                            0 likes
                            Last Post DJ888
                            by DJ888
                             
                            Started by Jon17, Today, 04:33 PM
                            0 responses
                            4 views
                            0 likes
                            Last Post Jon17
                            by Jon17
                             
                            Started by Javierw.ok, Today, 04:12 PM
                            0 responses
                            12 views
                            0 likes
                            Last Post Javierw.ok  
                            Working...
                            X