Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Getting data from chart to .txt

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

    Getting data from chart to .txt

    Hi,

    I would like to ask about ways to export data from ninja (kinetick data feed) into .txt.

    Lets say I have a 5 minute chart where I have volume indicator and CCI.
    Is there a way to export those data into txt file, which would be then shown as:

    Instrument Open High Low Close Time Volume CCI


    Thank you for help.

    #2
    Hello fLife,

    Thanks for your post.

    While not a complete answer you can always export your historical data via the Historical manager. The export does create a text file containing the Open, High, Low, Close and Volume, however the export is limited to Tick, Minute or daily type. http://ninjatrader.com/support/helpG...?exporting.htm

    To export data from a specific chart with indicators you would need to create a custom Ninjascript (indicator) that uses the C# Streamwriter. Here is a ninjascript example of how to do this: http://ninjatrader.com/support/forum...ead.php?t=3475

    In the example file, here is the line of interest:
    sw.WriteLine(ToDay(Time[0]) + " " + Open[0] + " " + High[0] + " " + Low[0] + " " + Close[0]);

    You could modify it to:
    sw.WriteLine(ToDay(Time[0]) + " " + Open[0] + " " + High[0] + " " + Low[0] + " " + Close[0]+" "+VOL[0]+" "+CCI[0]);
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      file location ?

      In which directory is that text file?

      Comment


        #4
        Hello spottysallrite,

        Thanks for your post and welcome to the Ninjatrader forums!

        When you click the export button of the Historical data manager, a standard windows document browser window will appear which will let you save the files where ever you wish.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Thanks for your welcome; it's good to be here.

          Well, I looked in the HDM, but didn't find that data there to export (yes, I did see how to export data to a location of my choosing).

          I invoked the SampleStreamWriter on a ES 09-15, 1000 Vol chart. Is that data now being recorded in the MyTestFile.txt file ? Is it accessible thru the HDM?

          Comment


            #6
            Hello spottysallrite,

            Thanks for your reply.

            Here is the helpguide section on Historical Data Manager: exporting: http://ninjatrader.com/support/helpG...?exporting.htm

            The streamwriter generated data would not be accessible through the Historical Data Manager unless you went through the import format and process, from the helpguide section on Historical data Manager Importing: http://ninjatrader.com/support/helpG...?importing.htm
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              ok, I'm confused. I thought you were saying the StreamWriter put data into a file that was directly accessible thru the HDM. If not, then how is the data that the StreamWriter produces to be accessed?

              Comment


                #8
                Hello spottysallrite,

                Thanks for your reply.

                The thread originated with a user that wanted to output data which would include indicator values in addition to the OHLCVT data, the only way to do that completely would be to use C# streamwriter. We have a reference sample indicator that can be modified to do that.

                I don't know what the originator of the thread intended for their end use of the data. It could be that he wanted to export that information into excel.

                Using the Historical Data Manager is just another way to get the OHLCVT data but you only get those Open, High, Low, Close, Volume and Time data, you do not get the indicator data that was originally requested.

                I hope that clarifies.
                Paul H.NinjaTrader Customer Service

                Comment


                  #9
                  Well, no, it doesn't clarify. So, I went hunting for that text file that StreamWriter writes to. Looks like I've found it.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by kempotrader, Today, 08:56 AM
                  0 responses
                  7 views
                  0 likes
                  Last Post kempotrader  
                  Started by kempotrader, Today, 08:54 AM
                  0 responses
                  4 views
                  0 likes
                  Last Post kempotrader  
                  Started by mmenigma, Today, 08:54 AM
                  0 responses
                  2 views
                  0 likes
                  Last Post mmenigma  
                  Started by halgo_boulder, Today, 08:44 AM
                  0 responses
                  2 views
                  0 likes
                  Last Post halgo_boulder  
                  Started by drewski1980, Today, 08:24 AM
                  0 responses
                  4 views
                  0 likes
                  Last Post drewski1980  
                  Working...
                  X