Help Data Export Ninja Trader 7

Discussion in 'Data Sets and Feeds' started by sftong, Sep 9, 2015.

  1. sftong

    sftong

    Hello, I just installed Ninja Trader 7, and I am hoping to be able to export the data of ES (E-Mini S&P500) into an Excel file, but I could not find any way to achieve this on the trading platform.

    I am looking to export both the 30 minutes and 1 minute interval, of Price (High, Low, Open, Close Candlestick) and Volume in that interval.

    I am attaching a screenshot of what I am seeing, and I could not find a way to export it. By the way, I login using the Demo account credentials which NinjaTrader emailed me. Username start with Demo23*****

    Thanks much!
    Sean

    T1.jpg
     
  2. Pelt

    Pelt

    I do and HAVE DONE this many times. If you are wanting to do this in NT7, and export the OHLC values along with time, what I do is use a script I created that is very simple. This will simply output what you have on your chart.

    You have several options to actually get the data INTO excel.

    You can actually write to an excel file with a DDE. This takes quite a while, as you see the excel file populating, it is quite time consuming and not worth it if all you want is the historical data to analyze later. If you are doing this real time, there are better ways of getting real time data into excel. Using something like XLQ is cheap and works better for this.

    You can write to a text file. This is much faster, and populates a text file on your desktop in a few seconds for several years of minute data. You then just open this with excel and turn it into an excel file. You have to setup streamwriter in your NT script. Depending on HOW MUCH DATA you have, this might be your option. But 30 min data does not require that much space for several years.

    You can simply output the data from your chart to the "Output Window" then copy and paste into excel. This is the simplest, and depending on HOW MUCH DATA, is the easiest and fastest. If you don't have much data, this is easiest option. Once you paste into excel, you simply go to Data->Text To Colums->and delimit based on the commas(I added commas into the script) as that's how excel will sort it.

    Feel free to modify the NT script to output what you want. I don't have one for volume, but you can probably figure out how to add it quickly. The attached file and picture is for option 3, of using the output window to get to your data.
     
    sftong likes this.
  3. sftong

    sftong

    thank you much, Pelt.

    I am going with your easiest path. But I really could not figure out how to export the chart data into the Output Window?

    Also, with the above method, is it possible to export the Volume data too? I would prefer both 1 minute and 30 minute. I can live with the 1 minute and use VBScript in Microsoft Access to transform into the 30-min interval I want.

    Oh one last thing. It seems like I receive an email stating my demo account only last for 14 days. Any chance I can get a more permanent account? I plan to do more thorough study before going to invest in the futures. T2.jpg

    Thanks again,
    Sean
     
  4. NinjaTrader_Ray

    NinjaTrader_Ray ET Sponsor

  5. Pelt

    Pelt

    Nice. All these years and I didn't even know that was an option.

    Sean, Ray's suggestion might be best for exporting your 1 min data.

    Maybe the options I gave might only better if you have a specific desire to output the data in a certain format. As with a script you can output exactly the way you want.
     
  6. sftong

    sftong

    Pelt,

    Yes, I think Ray mentioned that to me in a separate thread. That is one of the option I am exploring.

    But, your option offer another dimension, which is the quickest way without involving other programming steps, and is useful at times when I need to perform a quick analysis in 10 minutes, by just copying and pasting the data over to Excel.

    So would you mind explaining it again? I could not export the Chart into the Output Window, and I certainly would wish for the accompanied volume data.

    Thanks
     
  7. Pelt

    Pelt

    1) Install new indicator, it now has an additional "Volume" output column.

    2) In NT, go to Tools->Output Window
    This will open you output window. It should be blank. Note that you can right-click in this window for a few more options.

    3) Open a chart with the data you want to export. So if you want to export 1-min data, open up a 1min chart with the date range you want. If you want your data in 30-min, open a 30-minute chart with the date range. Same for ANY bar type or interval you want to export.

    4) Add the indicator to the chart, it will then populate the output window with the data. Note, that the output will be up to the right edge of the chart... so just make sure your chart is scrolled all the way to the right for a complete data fill.

    5) Copy data from output window. Click somewhere in the window, then Cntrl+A, then Cntrl+C to copy. Paste it into a blank excel sheet.

    6) In excel, make sure the first column is highlighted. Next go to Data->Text to Columns. Choose 'delimited.' Make sure the 'comma' radio box is checked. Click 'next' then 'finish.'

    That's it. If you want to do this again, for a different date range, or bar size/type, repeat the steps. Whatever you have on your chart is what it will export.

    As mentioned, there is a limit to how much data can be saved to the output window. Its pretty large though depnding on what you need to export. So you can either try option 2 I mentioned in my earlier post, or you can export the data in chunks and continue to paste to excel.
     
  8. sftong

    sftong

    Thanks much Pelt.

    I finally got the Vol data added to the chart, but somehow the Output window still blank, and I could not figure out a way to move the chart data over. I attached a screen shot , and as you can see, there is the ES future with Volume, but the Output window (right on top of the chart) is just blank.

    Thanks
    Sean
    T3.jpg
     
  9. Pelt

    Pelt

    Add the indicator I posted above in my post to your chart(HG6_BarOutput.zip). That is the script that will populate the output window.
     
    sftong likes this.
  10. sftong

    sftong

    Wow Yes! I finally got it working Pelt!

    I initially went to Tools --> New Ninja Script, and then did a host of other dance to get it work but in vain.

    Then it hit me that there is an easier way - -import NinjaScript in Zip format. When 1st try, it errors out. Then I realized maybe it was due to the "New Ninja Script" I created in the above step. Delete it, re-import your archive file again, and work like Magic!!

    Thanks so much!!
     
    #10     Sep 11, 2015
    Pelt likes this.