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

Backtesting longer time frames with Continuous Contract

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

    Backtesting longer time frames with Continuous Contract

    Hi folks. See https://app.screencast.com/jKArtkHR5OSH4

    I am trying to use the continuous contract but it is not backtesting. How do I get this to work? I am using NT Continuum data connection. What do I need to do to use it?

    Best,

    Greg

    #2
    Isn't that Kinetick only?
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #3
      I am not sure but just need to find out how to do it?

      Comment


        #4
        On Continuum just use the regular symbol like ES 06-23 and set your merge policy in Tools -> Options -> Market Data to Merge Non Back Adjusted or Merge Back Adjusted depending on whether or not you want back adjusted prices.

        See also: https://forum.ninjatrader.com/forum/...in-ninjatrader

        ES ##-## is a Kinetick-specific naming, I believe.
        Bruce DeVault
        QuantKey Trading Vendor Services
        NinjaTrader Ecosystem Vendor - QuantKey

        Comment


          #5
          QuantKey_Bruce Hi Bruce. Thanks for this info. Mine was on Merge Back Adjusted and I put it on Merge Non Back Adjusted. Then tried backtesting with a regular contract like ES 06-23 but it seems to still not take trades but only the first past 3 or 4 months. I am using Weekly Candles too FYI. Any other thoughts?

          Comment


            #6
            Do you have data that far back on your charts? Or are you looking at it only with Strategy Analyzer?
            Bruce DeVault
            QuantKey Trading Vendor Services
            NinjaTrader Ecosystem Vendor - QuantKey

            Comment


              #7
              Hello, thanks for writing in. The Continuous contract is not supported for the NinjaTrader Continuum connection, you must use the current contract and your choice of merge policy. If you want to backtest on a weekly chart, use Merge Back Adjusted and also check the "Chart" view at the top left of the strategy analyzer to make sure the system is loading all of the requested data.
              Chris L.NinjaTrader Customer Service

              Comment


                #8
                QuantKey_Bruce I am just using the Strategy Analyzer. For this, I am initially testing the last 1 year so Start date 05/09/2022 and End date is 5/09/2023. Maximum bars look back is currently set to 256 and Bars required to trade I have set currently to 20. After the test works, I want to ultimately test back 10-20 years or however far I am able eventually. Right now, I am testing only 1 year back for now until I get it to fire trades right. Thanks a bunch for your input Bruce! Greg P.S. I also have Break at EOD unticked.

                Comment


                  #9
                  Maybe you don't have the data you think you have. Try opening a similar chart (same bars and dates etc) and just scroll back - how far back does it go?
                  Bruce DeVault
                  QuantKey Trading Vendor Services
                  NinjaTrader Ecosystem Vendor - QuantKey

                  Comment


                    #10
                    QuantKey_Bruce I went back further and it seems to be working...went to 2008. I guess it needed more bars beyond a year to work. So, all is working now with futures. I tried the same with a individual stock though and it is only showing a trade for the last few bars even though there is 10 years of data loaded. Do you have any tips or things to look at in that regard (given it is working perfectly on futures now but only is taking 1 trade at the end of the data set on stocks like NVDA for example)? I see all the data going back 10 years on NVDA too.

                    Comment


                      #11
                      Hi, You should first check if your script is in fact processing all 10 years of NVDA data by simply using Print();. You can use Print for many debugging purposes such as this one:

                      Print(Time[0]); //adding this to OnBarUpdate will print out the timestamp on every bar update.

                      Please also test using the SampleMaCrossover strategy to see if this is trading the full data set.
                      Chris L.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by StockTrader88, 03-06-2021, 08:58 AM
                      45 responses
                      3,992 views
                      3 likes
                      Last Post johntraderuser2  
                      Started by TAJTrades, Today, 09:46 AM
                      0 responses
                      7 views
                      0 likes
                      Last Post TAJTrades  
                      Started by rhyminkevin, Yesterday, 04:58 PM
                      5 responses
                      62 views
                      0 likes
                      Last Post dp8282
                      by dp8282
                       
                      Started by realblubb, Today, 09:28 AM
                      0 responses
                      8 views
                      0 likes
                      Last Post realblubb  
                      Started by AaronKoRn, Yesterday, 09:49 PM
                      1 response
                      19 views
                      0 likes
                      Last Post Rikazkhan007  
                      Working...
                      X