Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Historical data imported does not work

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

    Historical data imported does not work

    I have imported historical data between the period 2003 - June 2009 and tried to do walk forward optimization and back testing. While the testing appears to be running and my walk forward optimization ran for about 4 hours, it gave '0' transactions and hence no profit or loss.

    I am running the strategy on range charts and therefore had uploaded tick data. I checked the data using the Historical Manager -> Edit mode and data appears to be there.

    For example in ES 09-03 I have 'Last' data, but no 'Bid' and 'Ask' data. For range data I would presume 'last data' is adequate?

    Any ideas why I am not getting any results?

    #2
    Hello,

    Yes, last data is all you need if that is what your strategy is running from.

    Can you please try this using one of the default strategies such as the SampleMACrossovers and test to see if you do not get any results for the same period.

    I look forward to assisting you further.
    MatthewNinjaTrader Product Management

    Comment


      #3
      I tried running it on a couple of default strategies with the same result. It is not picking up any transactions

      Comment


        #4
        sandeshrai, can you please try with the automatic merge feature set to DoNotMerge for the ES master instrument under Tools > Instrument Manager. If you add continuous contract data to the system it would be to import it to the ES ##-## symbol (this is the continuous contract and not the individual one). Then create a regular range chart with your data and check if this is contructed ok, then apply the SampleMACrossOver here (if you dont have a connection, please simply use the External Feed to be able to apply a strategy to the chart in backtesting).

        Thanks,

        Comment


          #5
          I set the feature to 'Do Not Merge' and constructed a range chart. It chat is constructed fine. When I ran the 'SampleMACrossover" strategy it does show trades. When I back tested my strategy however, it does not show any trades.

          My strategy does work on data for the current year (From Jan 1, 2011 to current date) which I did not upload.

          Comment


            #6
            Hello,

            Have you ran TraceOrders on your strategy to help determine why these trades are not being taken? If not, please see the following link:



            The output from the TraceOrders property set to true should give us a better idea of why these trades might be ignored/not filled.
            MatthewNinjaTrader Product Management

            Comment


              #7
              The strategy does execute trades in the live environment data as well as in backtesting.

              However, if you see my first note, I had uploaded historical data using the the Historical data manage. The strategy does not execute any trades on the uploaded historical data alone.

              I did incorporate the 'TraceOrders = true;' command and ran backtesting. I am not sure where I can retrieve the output from?

              Comment


                #8
                Hello,

                You should be able to see this by going to Tools--> Output window.
                MatthewNinjaTrader Product Management

                Comment


                  #9
                  I ran the trace on the old historical data and dont get any trace results. However, I am able to get a chart for the period. I tried this on the following periods:

                  1. 2/1/2006 - 2/28/2006
                  2. 2/1/2005 - 2/28/2005
                  3. 2/1/2006 - 4/21/2006

                  I ran the trace on current data (10/1/2011 - 10/31/2011) and I do get transactions as well as trace results.

                  Comment


                    #10
                    Hello,

                    If you do not see issues with the sample strategies, but have repeated issues on your strategy, you will need to debug your strategy. I would suggest simplifying the code as much as possible by commenting out segments you do not need for the basic functionality.

                    Click here for more information Debugging NinjaScript

                    Once you've checked that the strategy operates at a basic level (buys and sells during this period), you can readd the other conditions and statement to see if you can isolate the issue to a single line or group of code.
                    MatthewNinjaTrader Product Management

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    649 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    370 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    109 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    574 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    576 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X