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

Strategy Analyzer and multi-instrument and multi-timeframe strategy

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

    Strategy Analyzer and multi-instrument and multi-timeframe strategy

    Hello

    I want to test my multi-instrument and multi-timeframe strategy in Strategy Analyzer.
    Is it possible? I have 3 Data Series inside code but I can select only Main Instrument.

    How I can test my Strategy?

    Thanks a lot

    #2
    Hello sergey_z,
    Thanks for your post.

    You may add as many data series as you want, but the instrument you select in the Strategy Analyzer will be the Primary Data Series for the purposes of calculating the strategies logic.

    Are you wanting to be able to select other instruments from the Strategies parameters?
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_JoshG View Post
      Hello sergey_z,
      Are you wanting to be able to select other instruments from the Strategies parameters?
      Yes, it will be useful because Strategy for calculation use another 3 data series that I`m reading from Charts (I`m opens 4 trends in 1 Chart).


      But how I can do it in Analyzer ?
      I need write inside code Instrument Name for another 3 dataseries?

      Comment


        #4
        I can add your vote to the 'Dynamic Data Series' feature request but currently adding an instrument in this way is not supported. The help guide states:
        Arguments supplied to AddDataSeries() should be hardcoded and NOT dependent on run-time variables which cannot be reliably obtained during State.Configure (e.g., Instrument, Bars, or user input). Attempting to add a data series dynamically is NOT guaranteed and therefore should be avoided. Trying to load bars dynamically may result in an error similar to: Unable to load bars series. Your NinjaScript may be trying to use an additional data series dynamically in an unsupported manner.
        Help Guide - AddDataSeries()

        Because of this you will need to program your strategy in such a way that you do not need to select an instrument at run time.
        Josh G.NinjaTrader Customer Service

        Comment


          #5
          ok. Its clear.
          But what about rollovers for futures? If I want test strategy for January 2018 to June - I need create some strategies for each contract of CL and M6E?or Analyzer will merge contracts? or I need to select 1st time like CL01-18, 2nd CL02-18 from dropdown menu of Instruments in Analyzer?

          Comment


            #6
            Yes, you will need to hard code those instruments into your strategy even if that means a new strategy for each contract. The SA will merge contracts depending on your 'Merge Policy' setting. The following link has more information on Merge Policy.

            Josh G.NinjaTrader Customer Service

            Comment


              #7
              I would like to add my vote for multi instrument analyzer testing, too.
              Does multi-instrument strategy testing work on playback?

              Comment


                #8
                Hello TomTownsend,

                Thank you for your reply.

                Multi-instrument scripts that add data series of other instruments can be tested with the Playback connection, as long as you have data for the time period you're testing for each instrument.

                You can run a basket test with the Strategy Analyzer on several different primary series (you can select an instrument list in the instruments dropdown and it will test using each as the primary series), and multi-instrument scripts may also be tested with the Strategy Analyzer. Are you referring to dynamically adding additional instruments to add a vote to?

                Thanks in advance; I look forward to assisting you further.
                Kate W.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by selu72, Today, 02:01 PM
                1 response
                6 views
                0 likes
                Last Post NinjaTrader_Zachary  
                Started by WHICKED, Today, 02:02 PM
                2 responses
                11 views
                0 likes
                Last Post WHICKED
                by WHICKED
                 
                Started by f.saeidi, Today, 12:14 PM
                8 responses
                21 views
                0 likes
                Last Post f.saeidi  
                Started by Mikey_, 03-23-2024, 05:59 PM
                3 responses
                51 views
                0 likes
                Last Post Sam2515
                by Sam2515
                 
                Started by Russ Moreland, Today, 12:54 PM
                1 response
                8 views
                0 likes
                Last Post NinjaTrader_Erick  
                Working...
                X