Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Importing historical tick data..

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

    Importing historical tick data..

    I have some very high frequency tick data from the CME/CBOT in CSV format.
    Is there a process that I can import into NT for back-testing?

    #2
    Please see the following link for instructions to import historical tick data.


    Make sure the data is in the correct format.
    JasonNinjaTrader Customer Service

    Comment


      #3
      [FONT='Calibri','sans-serif']Hi,[/FONT]
      I have purchased and imported historical data (in the correct format) into Ninja Trader from a text file (.txt) dating from 1999 for the continuous YM mini Dow ($5) contract. The historical data does not appear in the standard charts – only historical data provided from my barchart.com connection is shown. However, the full historical data does appear in the Strategy Analyser chart but the statistic results from any backtesting only covers the historical data up to the date provided by barchart.com i.e. whether I backtest from 1st Jan 2002 to 25th Jan 2009 or baktest from 1st Jan 2008 to 25th Jan 2009 I get the same backtesting statistic results.

      [FONT='Calibri','sans-serif']Yes, I have tried without being connected to BarChart but the effect is the same. I have read the article [/FONT][FONT='Verdana','sans-serif']“When does NinjaTrader Load Historical Data” [/FONT][FONT='Calibri','sans-serif']– is it case that whenever Ninja Trader detects it has to reload data, does this mean Ninja Trader will delete/remove all of the historical data from 1997 -2008 that I imported from a text file? If so why does the full historical data (1997 – 2009) appear in the Strategy Analyser chart but not the other standard charts and [/FONT]statistic results from any backtesting only covers the historical data up to the date provided by barchart.com i.e. whether I backtest from 1st Jan 2002 to 25th Jan 2009 or backtest from 1st Jan 2008 to 25th Jan 2009 I get the same backtesting statistic results? Please help.

      Comment


        #4
        Hello dowtrader,

        Could you please tell me the name of the text file you imported.


        Create a YM ##-## instrument in the Instrument Manager and add it to your instrument list.


        Name the historical data text file, YM ##-##.txt.

        Import it into NinjaTrader.

        Check if the imported historical data is displayed upon opening a YM ##-## chart.
        JasonNinjaTrader Customer Service

        Comment


          #5
          The File is called YM 03-09.TXT. Like I said, I can see the historical data in the strategy analyser chart but not in any other chart. Again, even though I can see the historical data in the strategy analyser chart when I backtest, the actual backtest results only cover data upto April 2008 even though I set it to test upto 1997. I can see data dates from 1997 to 2009 on the strategy analyser chart but no entry/ exit signals and no execution/trades prior to April 2008. I think this started to happen when I added the following two lines to my strategy but I'm not sure how this could possibly affect historical data:

          Add(PeriodType.Day, 1); // BarsInProgress == 5 and is in the Initialize() method

          dcmlDailyATRvalue = (
          decimal)(ATR(BarsArray[5],3)[1]; // in a seperate method

          The Primary bar is 5min chart.

          Comment


            #6
            Hi dowtrader, which type of data did you import? Was it also daily data? If not, then NinjaTrader will check for which period it has the full data needed (min and daily), so this may be what you see here.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              I imported tick data but at the time of importing I was prompted with the message: " NinjaTrader can construct minute bars based on the imported tick data. Do you wish to generate minute bars?". I replied Yes to this prompt so I assume that I have imported minute bar data. If so, does this mean I cannot access Daily bars beyond the date of historical data provided by my BarChart connection despite having imported historical data from 1997 to 2008 from a text file? In that case would I have to use
              Add(PeriodType.Minute,
              1440) instead of
              Add(PeriodType.Day, 1
              ).

              Thanks in advance.

              Comment


                #8
                I imported tick data but at the time of importing I was prompted with the message: " NinjaTrader can construct minute bars based on the imported tick data. Do you wish to generate minute bars?". I replied Yes to this prompt so I assume that I have imported minute bar data. If so,

                1) does this mean I cannot access Daily bars beyond the date of historical data provided by my BarChart connection despite having imported historical data from 1997 to 2008 from a text file?

                2) Or is there some other limit on the use of daily bars?

                3) In that case would I have to use
                Add(PeriodType.Minute, 1440) instead of
                Add(PeriodType.Day, 1).

                Thanks in advance.

                Comment


                  #9
                  Hi dowtrader, you are correct as there are no daily bars from your imported data then present. So please try using the 1440 min as a substitute.
                  BertrandNinjaTrader Customer Service

                  Comment


                    #10
                    I assumed that Ninja Trader would have constructed Daily bars out of the imported Minute bar historical data. Anyway now I have used

                    Add(PeriodType.Minute, 1440)

                    instead of

                    Add(PeriodType.Day, 1).

                    and now the back testing works as expected. Thanks for your support - much appreciated.

                    Comment


                      #11
                      However I still have the problem that the historical data does not appear in the standard charts – only historical data provided from my barchart.com connection is shown and not the imported historical data dating from 1997 to 2008 even in Minute bar charts. I have format the data series in a new chart.

                      Comment


                        #12
                        Under which symbol did you import the data? Was it a continuous one (##-##)
                        BertrandNinjaTrader Customer Service

                        Comment


                          #13
                          I imported the data under the YM 03-09 symbol using a text file called YM 03-09.txt.

                          Comment


                            #14
                            Please try importing the data under YM ##-## and see if that works.
                            BertrandNinjaTrader Customer Service

                            Comment


                              #15
                              Hi,

                              1) Ok I tried that and I can now see the historical data in my standard charts when I disconnect from barchart.com but when I attempt to back test my strategy using YM ##-## I got the error message attached and Ninja Trader crashed. (I haven't come across the ##-## format, is there more can read about this?).

                              2) Also, can I merge YM ##-## with YM 03-09 so that I can use YM 03-09 and my barchart.com connection? I use barchart.com for my connection so will this be affected in anyway?

                              3) When I tried to back test my strategy using YM ##-## I got the error message attached.

                              Thanks in advance.
                              dow trader, London. UK.
                              Attached Files
                              Last edited by dowtrader; 01-29-2009, 11:10 AM.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Brevo, Today, 01:45 AM
                              0 responses
                              3 views
                              0 likes
                              Last Post Brevo
                              by Brevo
                               
                              Started by aussugardefender, Today, 01:07 AM
                              0 responses
                              3 views
                              0 likes
                              Last Post aussugardefender  
                              Started by pvincent, 06-23-2022, 12:53 PM
                              14 responses
                              239 views
                              0 likes
                              Last Post Nyman
                              by Nyman
                               
                              Started by TraderG23, 12-08-2023, 07:56 AM
                              9 responses
                              384 views
                              1 like
                              Last Post Gavini
                              by Gavini
                               
                              Started by oviejo, Today, 12:28 AM
                              0 responses
                              6 views
                              0 likes
                              Last Post oviejo
                              by oviejo
                               
                              Working...
                              X