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

Export to Excel (indictors)

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

    Export to Excel (indictors)

    Hi NT,

    I am looking at a chart; CL 2000 ticks for instance, with indicators.
    Is there a way to export these values to Excel ?

    Thanks
    AK

    #2
    Hello AK,

    Thank you for your note.

    To get information from an indicator to excel you would need to write that information to file from the indicator.


    Or, you could add the indicators to a market analyzer and then export the grid contents.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks Chelsea,

      I am assuming that your second solutions will only allow me to get the 'current' value ?
      If I wanted to export ATR historically for instance, I'd need your first suggestion - is that correct ?

      Once I import SampleStreamWriter indicator, what actions do I need to do to export the data to excel ? I have added the sample indicator to a chart which results in a blank panel.

      I see the following line in the sample:

      Code:
      path = NinjaTrader.Core.Globals.UserDataDir + "MyTestFile.txt"; // Define the Path to our test file
      Am I correct in saying that this should be change to a local directory (destination) and NT8 will write the excel file once the Indicator script compiles ?
      Last edited by akvevo; 08-01-2017, 04:57 PM.

      Comment


        #4
        Hello akvevo,

        Yes, the export grid contents would be a snapshot of the current data.

        To export historical values a custom coded indicator is needed.

        The SampleStreamWriter is a sample that demonstrates the code necessary to write to a file.

        This provides a learning tool so that you can use the same building blocks to create your custom indicator that writes values to file (in the format you choose).

        For Excel, I would recommend a .cvs text file with values delimited by commas.
        Steps on how you can create a CSV file in a text editor such as notepad, microsoft excel, OpenOffice calc, and google docs.


        After importing to view the code of the SampleStreamWriter indicator
        • Click New -> NinjaScript Editor
        • On the right in the explorer pane double click the Indicators folder
        • Double click SampleStreamWriter to open it
        Last edited by NinjaTrader_ChelseaB; 08-02-2017, 07:24 AM.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Works a treat, thanks

          Comment


            #6
            I'm new to NT8. Most other platforms I work with exporting data to excel is a very simple & a couple of clicks. Do you have a simple way to export to excel data from a chart (OHLC, a couple MA's)?

            I installed the sample stream writer but I'm not a computer programmer, I am a trader.

            Thanks in advance

            Comment


              #7
              Hello Angus7,

              Thanks for your reply.

              There are no means within NinjaTrader to export chart data to excel. I will enter a feature request to add this capability to NinjaTrader8 and will update this thread when I have further information.

              The sample steamwriter is a working example of how to code to output data from the chart to a file that can be read in excel. If you would like this customized for you, we can provide references to 3rd party coders who can provide coding services.
              Paul H.NinjaTrader Customer Service

              Comment


                #8
                Can you export to csv today?

                Comment


                  #9
                  Hello Angus,

                  Thanks for your reply.

                  Today you can export from the Historical data manager to a text file that can be read into excel. This would be the data that NinjaTrader builds bars from. The historical data would be available in 1-tick, 1-minute or 1-day bar formats, please see: https://ninjatrader.com/support/help...?exporting.htm (Here is a link for importing data, I added because it explains the text file format we export to: https://ninjatrader.com/support/help...?importing.htm)

                  If you want to export a charts data, then you would have to use the samplesteamwriter that outputs only the OHLC data of the charts bars to a text file that can be read into excel.

                  As previously advised there is no built in means to export chart data and indicator data.
                  .
                  Paul H.NinjaTrader Customer Service

                  Comment


                    #10
                    Wow, that surprises me that you can't export data to excel. I've never run across that in any of the platforms that I currently use(I'm running 4 other trade platforms).

                    Thanks

                    Comment


                      #11
                      Hello Angus7,

                      The feature request to export chart data already exists so your vote was added to it. For your future reference the feature request is assigned as SFT-2077, "Add Export feature for Y-Axis values"

                      If/when the feature request is implemented, it will be listed in the Release notes of the version, which can be seen in the helpguide.

                      Thanks for your interest in improving our product.
                      Paul H.NinjaTrader Customer Service

                      Comment


                        #12
                        Hello,

                        I really love the ninjatrader platform especially since the new order flow tools have been available. I would also like to export certain indicator data to excel and I am inquiring about the "Add Export feature for Y-Axis values". I am wondering if this feature has been implemented yet for ninja trader.

                        Thank you for your assistance

                        Comment


                          #13
                          Hello TheTrader1997,

                          Thank you for your reply.

                          There is no current update on this particular request, SFT-2077. However, we are continuing to gather user votes for the request and it remains open.

                          As with all feature requests, interest is tracked before implementation is considered, so we cannot offer an ETA or promise of fulfillment. If implemented, it will be noted in the Release Notes page of the Help Guide.

                          Release Notes — https://ninjatrader.com/support/help...ease_notes.htm

                          Please let us know if we may be of further assistance to you.
                          Kate W.NinjaTrader Customer Service

                          Comment


                            #14
                            Hello,

                            I would like to export, from NT8 to CSV or TXT file, the historical values of some indicators. Could you please show me how to proceed ?

                            I followed the steps you shared in the previous post :


                            but I don't know which line(s) to customize in StreamWriter in order to get the historical values of my indicators, in different time frames.

                            Thank you in advance

                            Comment


                              #15
                              Hello gtsouli,

                              Thank you for your reply.

                              You'd need to call the indicator within your script and then get the current value on each bar and add that to where it actually writes the line. I'm attaching a very simple modification of the SampleStreamWriter found in our help guide that calls a 14 period SMA and exports this value to a .csv file along with the Time, Open, High, Low, and Close prices.

                              Please let us know if we may be of further assistance to you.
                              Attached Files
                              Kate W.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Gerik, Today, 09:40 AM
                              1 response
                              6 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Started by RookieTrader, Today, 09:37 AM
                              1 response
                              10 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by alifarahani, Today, 09:40 AM
                              0 responses
                              5 views
                              0 likes
                              Last Post alifarahani  
                              Started by KennyK, 05-29-2017, 02:02 AM
                              3 responses
                              1,285 views
                              0 likes
                              Last Post NinjaTrader_Clayton  
                              Started by AttiM, 02-14-2024, 05:20 PM
                              11 responses
                              186 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Working...
                              X