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

NT7/NT8 Conversion

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

    #16
    Hi!
    Can someone convert DataExport (export your data in different time frame to csv) for NT8
    Attached Files

    Comment


      #17
      Hello 123vit,

      Thanks for your post and welcome to the NinjaTrader forums.

      In looking briefly at the code, it appears to be an enhanced version of the reference indicator we provide as an example of how to write to a file. We have a reference in NT7 that we have converted to NT8 so you may want to have a look at it. Here is a link to the reference example of exporting data: http://ninjatrader.com/support/forum...ead.php?t=3475

      Just to be clear, in the support department at NinjaTrader we do not create, debug, or modify code for our clients. This is so that we can maintain a high level of service for all of our clients.

      We can certainly leave this thread open for any member that would like to convert for you.

      Alternatively, we can provide you with references to 3rd party coders who can convert for you.
      Paul H.NinjaTrader Customer Service

      Comment


        #18
        Thanks for your reply.
        This indicator works well.
        Only one thing: how to make the filename match the name of the exported instrument?

        Comment


          #19
          Hello 123vit,

          Thanks for your reply.

          path = NinjaTrader.Core.Globals.UserDataDir + "MyTestFile.txt";

          You will need to edit this line of code contained within the if(State == State.SetDefaults) check if you want to edit the name of the text file that is created.

          You can change the MyTestFile.txt name to the name of your instrument, for example: "ES 09-17.Last.txt"

          Please let me know if I may be of any further assistance.
          Alan S.NinjaTrader Customer Service

          Comment


            #20
            I was helped in another forum.
            Decision is (path = NinjaTrader.Core.Globals.UserDataDir + Instrument.FullName+".txt"

            Comment


              #21
              Hello 123vit,

              Thanks for your reply.

              This is an alternate method you may utilize.

              Note that when you attempt to import historical data into the platform with a file name of ES 09-17.txt, you will need to ensure you are selecting the correct data type that the price data is based on in the import section.

              However to avoid confusion, I would recommend including this in the name of the file. So I suggest to make the following modification if you hypothetically were saving data based on Last prices to a .txt file:

              path = NinjaTrader.Core.Globals.UserDataDir + Instrument.FullName+"Last.txt";

              Please let me know if I may be of any further assistance.
              Alan S.NinjaTrader Customer Service

              Comment


                #22
                Thank you for your help.
                And how to change the export folder path so that it is d:\Data

                Comment


                  #23
                  Hello 123vit,

                  Thanks for your reply.

                  Edit the path variable to read:

                  path = "d:\Data" + Instrument.FullName + "Last.txt";

                  Please let me know if I may be of any further assistance.
                  Alan S.NinjaTrader Customer Service

                  Comment


                    #24
                    Thank you,
                    but it doesn't work (see screenshot)
                    Attached Files

                    Comment


                      #25
                      Hello 123vit,

                      Use two slashes.

                      See line 85 of the following sample for a sample of how to reference a file path.


                      Please let us know if you need further assistance.
                      Alan P.NinjaTrader Customer Service

                      Comment


                        #26
                        Instead of using path = "d:\Data" use path = @"d:\Data"

                        Comment


                          #27
                          Hello! Thank you all for your answers.
                          I tried the solutions you proposed, but it did not work out.
                          In the path = @ "d: \ Data" option, the file is not created anywhere.

                          "Two slashes" I tried in all cases, but the result is negative.

                          I'm at a loss, as I thought it should be easy.

                          Comment


                            #28
                            Hello 123vit,

                            Thank you for your note.

                            Could you please confirm if you have used path = "D:\\Data" ? If you are trying to get the instrument.fullname, please try using State.DataLoaded rather than State.Configure. I would suggest trying to create this without the instrument to isolate where the problem is coming from.

                            I look forward to your reply.

                            Comment


                              #29
                              Thanks again for your help!
                              Now everything works!

                              right path is "d: \\ Data \\"

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by yertle, Yesterday, 08:38 AM
                              7 responses
                              28 views
                              0 likes
                              Last Post yertle
                              by yertle
                               
                              Started by bmartz, 03-12-2024, 06:12 AM
                              2 responses
                              21 views
                              0 likes
                              Last Post bmartz
                              by bmartz
                               
                              Started by funk10101, Today, 12:02 AM
                              0 responses
                              4 views
                              0 likes
                              Last Post funk10101  
                              Started by gravdigaz6, Yesterday, 11:40 PM
                              1 response
                              9 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Started by MarianApalaghiei, Yesterday, 10:49 PM
                              3 responses
                              11 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Working...
                              X