Announcement

Collapse
No announcement yet.

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.​​
                          <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

                          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 NullPointStrategies, Today, 05:17 AM
                            0 responses
                            44 views
                            0 likes
                            Last Post NullPointStrategies  
                            Started by argusthome, 03-08-2026, 10:06 AM
                            0 responses
                            124 views
                            0 likes
                            Last Post argusthome  
                            Started by NabilKhattabi, 03-06-2026, 11:18 AM
                            0 responses
                            65 views
                            0 likes
                            Last Post NabilKhattabi  
                            Started by Deep42, 03-06-2026, 12:28 AM
                            0 responses
                            42 views
                            0 likes
                            Last Post Deep42
                            by Deep42
                             
                            Started by TheRealMorford, 03-05-2026, 06:15 PM
                            0 responses
                            46 views
                            0 likes
                            Last Post TheRealMorford  
                            Working...
                            X