Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

No results for backtest (newb)

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

    No results for backtest (newb)

    Hello,

    I'm new to NT. When I try and run the backtest I don't get any values on the "Summary" tab in the Strategy Analyzer. I know the code / NinjaScript works... Is there a "general" reason, or "gotcha" that I might be missing?

    Thanks for anything,
    Robert
    Last edited by RobVig; 04-18-2016, 06:42 PM. Reason: Addl info

    #2
    Hello RobVig,

    Thank you for your post.

    It could be there is no data for the selected instrument and/or period. Please answer the following questions so we may investigate this matter further.
    • Do you see results when running the same test on the SampleMaCrossOver strategy in NinjaTrader with the same settings as your strategy?
    • Are you connected to your data feed provider when running this test?
    • Do you have data in the Historical Data Manager (Tools > Historical Data Manager) for the instrument and period you are testing the strategy on?
    • What instrument(s) have you selected? If a futures instrument, what expiry is selected? (Example: ES 06-13)
    • What interval is selected for your chart(s)? (Example: Tick, Minute, Day, etc.)
    • What From and To date have you selected?

    Comment


      #3
      Hi Patrick! Thanks for responding.

      Here are the answers to your bullet points:

      • Do you see results when running the same test on the SampleMaCrossOver strategy in NinjaTrader with the same settings as your strategy? YES. "SampleMa.." yields results. This indicates to me it's my configuration. However... I'm copying "click for click" with this NT Video: https://www.youtube.com/watch?v=MaaqCBoqYxI so I should be seeing results..
      • Are you connected to your data feed provider when running this test? YES
      • Do you have data in the Historical Data Manager (Tools > Historical Data Manager) for the instrument and period you are testing the strategy on? YES
      • What instrument(s) have you selected? If a futures instrument, what expiry is selected? (Example: ES 06-13) ES 06-13
      • What interval is selected for your chart(s)? (Example: Tick, Minute, Day, etc.) DAY
      • What From and To date have you selected? From: 1/1/2016 To: 4/17/2016

      Comment


        #4
        Are you testing the ES 06-13 or ES 06-16?
        Can you attach your strategy to your response?
        You can attach your strategy to your response by going to File > Utilities > Export NinjaScript > Export selected source files > select your strategy > select the right arrow > Export. The file will be located under (My) Documents\NinjaTrader 7\bin\Custom\ExportNinjaScript.

        Comment


          #5
          Here's the zip
          Attached Files

          Comment


            #6
            RobVig,

            Thank you for your response.

            The strategy restricts entries between 8:30 AM and 2:30 PM. On a Daily chart it may be closing outside this time and therefore not hit these conditions. What time zone are you in? Are you testing the ES 06-13 or ES 06-16? And are you connected to Kinetick EOD, if not who are you connected to? This is displayed by green on lower left corner of the Control Center window.

            Comment


              #7
              Patrick,

              Thank you for sticking with me. As a "newbe" it's very helpful.

              Regarding your questions for me:

              Q - What time zone are you in?
              A - Eastern Time Zone

              Q - Are you testing the ES 06-13 or ES 06-16?
              A - ES 06-16.
              *Q - How do I access historical data for a given instrument using the Strategy Analyzer?
              *A -

              Q - And are you connected to Kinetick EOD?
              A - Yes

              Comment


                #8
                Hello RobVig,

                Thank you for your response.

                The time restriction is ending before the Daily bar ends and there fore never returns true. This is due to the Daily bars only being the Open, High, Low, and Close of the day and the only timestamp is that of the closing time. You would need to remove the time restrictions or expand it out past the closing time of the Daily bar.

                To check historical data you would need to go to the Historical Data Manager under the Tools menu on the Control Center. For information on the Historical Data Manager please visit the following link: http://ninjatrader.com/support/helpG...ta_manager.htm

                Comment


                  #9
                  Ah ha! Great! Thank You for your help Patrick!

                  Question about the Time Constraints...
                  What aspect of them is filtering the data? The reason I ask is because I don't see the Year or Month being specified in the code, just the Time of Day.

                  Example:

                  if (CrossAbove(SMA(FastMA), SMA(SlowMA), 1)
                  && ToTime(Time[0]) >= ToTime(8, 30, 0)
                  && ToTime(Time[0]) < ToTime(14, 30, 0))
                  {
                  ...

                  I am using 1/1/2016 - 1/17/2016 as the time period. Shouldn't ES 03-16 work for this? What am I missing with this logic?
                  Last edited by RobVig; 04-20-2016, 08:12 AM.

                  Comment


                    #10
                    RobVig,

                    The dates are no problem for that contract month. It is the time in hours, minutes, and seconds. Take a look at the Data Box on the Daily chart you should see the time of the bar and it is outside of the time filter you have in place in your conditions. To view the Data Box right click in your chart and select Show Data Box.

                    Comment


                      #11
                      I see now. Thank You for the lesson Patrick.

                      Comment


                        #12
                        Originally posted by RobVig View Post
                        Here's the zip
                        Thanks for sharing

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by helpwanted, Today, 03:06 AM
                        2 responses
                        21 views
                        0 likes
                        Last Post NinjaTrader_LuisH  
                        Started by DayTradingDEMON, Today, 09:28 AM
                        0 responses
                        2 views
                        0 likes
                        Last Post DayTradingDEMON  
                        Started by navyguy06, Today, 09:28 AM
                        0 responses
                        2 views
                        0 likes
                        Last Post navyguy06  
                        Started by rjbtrade1, 11-30-2023, 04:38 PM
                        2 responses
                        77 views
                        0 likes
                        Last Post DavidHP
                        by DavidHP
                         
                        Started by cmtjoancolmenero, Yesterday, 03:58 PM
                        8 responses
                        31 views
                        0 likes
                        Last Post NinjaTrader_ChelseaB  
                        Working...
                        X