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 What Data to Use

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

    Strategy Analyzer and What Data to Use

    Can someone please clarify - is historical data required to be downloaded to be used with the Strategy Analyzer or will it use market replay data?
    I have been downloading market replay data to be used with at playback connection and, of course, that is working for me. But when I try to run the same date and strategy in Strategy Analyzer, nothing plots on the Analyzer's chart.

    #2
    Hello reynoldsn,

    Thanks for your post.

    The Strategy Analyzer requires historical data and does not use Market Replay data. We do not recommend using the Strategy Analyzer when connected to the Playback Connection as the Playback Connection will adjust the data that can be requested by the Strategy Analyzer and the backtest performed will not reflect the settings used for the backtest.

    If you are connected to your data provider, historical data will be requested for your backtest in the Strategy Analyzer if the data is not already available.

    Let us know if there is anything else we can do to help.
    JimNinjaTrader Customer Service

    Comment


      #3
      May I ask a related question? I am running automated strategies 24/7 on a vps using my Lifetime License with my Continuum connection and performing backtests with strategy analyzer on my local computer using the "Kinetic End of Day" Connection. Is this a good choice? Could I get any distortion in the data I use? Am I receiving all intraday data with the "Kinetic End of Day" connection? My strategies are all intraday. Thanks

      Comment


        #4
        Hello Danilod,

        Kinetick End of Day Free does not include intraday data and only provides historical daily data. Regular Kinetick connections offer daily, minute, and tick data that is bid/ask stamped (compatible with Order Flow + tools)

        For more information on what data is needed to build bars please see below:



        For a breakdown of supported data providers and the data they offer, please see below.

        JimNinjaTrader Customer Service

        Comment


          #5
          Thanks Jim. So if I want to run automatic strategies in a vps using my lifetime license and I would like at the same time to optimize those strategies using my local computer, how can I do it? Is there any other away apart from the obvious: buying a second lifetime license? I am currently analyzing 8 months of data in my local computer and I am getting this error: "" 'You are accessing an index with a value that is invalid out-of-range'

          . Thanks.

          Comment


            #6
            Hello Danilod,

            You can use the Sim license key on your home PC as you just want to use it for backtesting and practice trading. This would only limit you from using the Order Flow + tools on your home PC when your VPS is active. License keys are entered in the Control Center under Help > License Key. The Sim license key is included below.

            @SIM-A82F-D583-40B1-AE74-B79F-705D-1952

            As for index out of range errors, these can either be a case where toy are referencing X BarsAgo before the strategy has processed that many bars (use a CurrentBar check) or it would involve accessing an element that does not exist in an array. I.E. referencing element 6 in an array that only holds 5 elements.

            I suggest using prints to identify where the line in question is that is throwing the error. IF you are unsure how that line is causing that error, please copy that line here for our insight.

            Debugging Tips - https://ninjatrader.com/support/help...script_cod.htm

            Making sure there are enough bars in the data series you are accessing - https://ninjatrader.com/support/help...nough_bars.htm
            JimNinjaTrader Customer Service

            Comment


              #7
              Jim,
              The simulation license works great for me thanks for that. As for the error I am getting. The strange thing is that the error appears if I enter in the Strategy Analyzer as a start date:
              01/01/2021
              02/01/2021
              03/01/2021

              but the error disappears if i use as a start date:
              04/01/2021

              In all cases why end date is 9/16/2021.

              I am currently connected to the sim license you've provided.

              I'm not sure where in the code to put the print() and what parameters to include on them to debug this kind of errors. Could you give me an example?

              Thanks again.

              Comment


                #8
                And one more question. Once I enter the sim license you gave me. What connection should I activate in order to see intraday historic data (no need for real time data).
                Thanks

                Comment


                  #9
                  Hello Danilod,

                  You will need to connect to a connection that offers historical data. This could be when connected to your brokerage account, or to a dedicated market data provider service, like Kinetick. Please note that most often you cannot connect to a brokerage account from multiple locations.

                  Market Data Provider options - https://ninjatrader.com/Choice

                  Data By Provider - https://ninjatrader.com/support/help...y_provider.htm

                  As for the strategy issue, you can think of a strategy as a mathematical function. When the input data changes, the results will change. The strategy can reach different parts of logic under certain conditions, and the input data can change where the strategy reaches certain parts of code and hits the error.

                  A print message would be to output a string to the NinjaScript Output Window. For this kind of error, you want to find the line of code that throws the error when you set up the strategy with the settings that hit the error. You would then place meaningful prints (I.E. unique names, line numbers) throughout the code so you know which specific print is seen and what line of code the strategy reaches when the error is reached. Once the line of code that throws the error is found, you will want to see what is being indexed (between [] brackets) which would be out of range.
                  JimNinjaTrader Customer Service

                  Comment


                    #10
                    Originally posted by NinjaTrader_Jim View Post
                    Hello Danilod,

                    You will need to connect to a connection that offers historical data. This could be when connected to your brokerage account, or to a dedicated market data provider service, like Kinetick. Please note that most often you cannot connect to a brokerage account from multiple locations.

                    Market Data Provider options - https://ninjatrader.com/Choice

                    Data By Provider - https://ninjatrader.com/support/help...y_provider.htm

                    I would prefer not to buy another data service if it is not necessary. I read in the forum that another representative suggested to create a demo free account to use on my home computer for backtest? Will this be enough for optimizing strategies using strategy analyzer?
                    thanks

                    Comment


                      #11
                      Hello Danilod,

                      You can either disconnect from the brokerage account on the first PC to connect on the second PC, or you could consider connecting to another account/data provider.

                      Connecting to a demo account would work for a short period of time if you have not used your allotted demo's. CQG provides demo accounts when registering from the link below and those demo accounts are limited to one 2 week demo per user per year.

                      NinjaTrader is a futures trading platform that delivers integrated multi-device trading. Discover our best platform to trade futures for active futures traders.
                      JimNinjaTrader Customer Service

                      Comment


                        #12
                        Originally posted by NinjaTrader_Jim View Post
                        Hello Danilod,

                        You can either disconnect from the brokerage account on the first PC to connect on the second PC, or you could consider connecting to another account/data provider.

                        Connecting to a demo account would work for a short period of time if you have not used your allotted demo's. CQG provides demo accounts when registering from the link below and those demo accounts are limited to one 2 week demo per user per year.

                        https://ninjatrader.com/FreeLiveData
                        I need a solution that lets me recreate the environment I have in my VPS which is working 24/7. I could stop it for a few minutes to download offline data to my home computer though. Would I be able to use this offline data to backtest on historical data efficiently?

                        Comment


                          #13
                          Hello Danilod,

                          Yes, if you have downloaded the historical data on your home PC needed for the backtest, you can backtest with the Strategy Analyzer when disconnected.

                          If you do not have the data, you will need to connect to a data provider to request and download it to be able to backtest that data.
                          JimNinjaTrader Customer Service

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by michi08, 10-05-2018, 09:31 AM
                          2 responses
                          737 views
                          0 likes
                          Last Post Denver_Wayne  
                          Started by sightcareclickhere, Today, 01:55 PM
                          0 responses
                          1 view
                          0 likes
                          Last Post sightcareclickhere  
                          Started by Mindset, 05-06-2023, 09:03 PM
                          9 responses
                          258 views
                          0 likes
                          Last Post ender_wiggum  
                          Started by Mizzouman1, Today, 07:35 AM
                          4 responses
                          18 views
                          0 likes
                          Last Post Mizzouman1  
                          Started by philmg, Today, 01:17 PM
                          1 response
                          8 views
                          0 likes
                          Last Post NinjaTrader_ChristopherJ  
                          Working...
                          X