Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Import trade data into NT

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

    Import trade data into NT

    Hi,

    This probably requires some out of the box thinking but I'm curious if it's possible to import historical trade executions into NT from a different trading platform and perhaps be able to do trade analysis such as MAE and MFE within NT.

    I have time stamps, execution symbol, order numbers, entries and exits.

    #2
    Hello calhawk01,

    Thank you for the post.

    It is currently not possible to edit the database in this way. I can put in a feature request for this to be added in future revisions if you would like.

    Please let us know if we may be of any further assistance.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChrisL View Post
      Hello calhawk01,

      Thank you for the post.

      It is currently not possible to edit the database in this way. I can put in a feature request for this to be added in future revisions if you would like.

      Please let us know if we may be of any further assistance.
      Hi Chris,

      Thanks for you response.

      However, I believe NT does have a feature for adding execution data. I just tested it with one trade and NT was able to compare and contrast my entries and exits, time of execution, and then provide MAE and MFE analysis and other trade analysis features.

      New -> trade performance -> execution -> manually enter the execution.

      So the feature is there, how can I import a large set of data into this feature? I don't see any option to manually enter executions via excel. Do you know what the file within NT folder that is related to this feature? Perhaps it would be easier to edit that file?

      My understanding is that the execution data is saved in a SQL file: C:\Users\Administrator\Documents\NinjaTrader 8\db\ninjatrader.sdf - how can I edit this file? I tried to open it using a few programs but it says the file is being used by another computer (i guess thats on your network?). I'd imagine it just needs to be updated with the required data fields?

      Thank you so much!
      Last edited by staycool3_a; 10-04-2017, 01:37 PM.

      Comment


        #4
        Hello, calhawk01.

        Thanks for the reply.

        This information is stored inside of the 'db' folder, in the file named 'NinjaTrader.sdf'. It might be possible to edit this file with this publicly available tool, I will try that out today:


        Other than this, there is not a way to batch add the executions.

        Please let us know if we may be of any further assistance.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_ChrisL View Post
          Hello, calhawk01.

          Thanks for the reply.

          This information is stored inside of the 'db' folder, in the file named 'NinjaTrader.sdf'. It might be possible to edit this file with this publicly available tool, I will try that out today:


          Other than this, there is not a way to batch add the executions.

          Please let us know if we may be of any further assistance.
          So it's possible to edit it. Make sure you have NT closed when you try to open the file. Below is a screenshot when the file is opened up in a SDF viewer/editor. It has many columns, some columns are confusing:

          Time = 6.36427E+17

          StatementDate = 6.36427E+17

          MaxPrice = -1.7976931348623157E+308

          MinPrice = 1.7976931348623157E+308

          Since i'm in particular mostly interested in calculating MAE and MFE, I'm curious if the above max/min prices are used by the output feature (trade performance), when it performs it's MAE/MFE calculations.

          Thank you trying to test out. It doesn't seem like an impossible thing to do, by the first look. Just need some definitions of what these columns mean and what their limitations are when they're being used in the output for trade performance analytics.

          *update: so I updated all the columns, reran N8, and when I ran the tradeperformance file and "generated" the data -> following error:

          Unhandled exception: The column at the specified ordinal (9) contains DBNull value which can not be represented as a built-in .NET system type. Use SqlTypes or IsDBNull property.
          Attached Files
          Last edited by staycool3_a; 10-04-2017, 02:27 PM.

          Comment


            #6
            Hello calhawk01,

            Thanks for the follow up.

            That is very interesting. What tool did you use to do this?

            Unfortunately, doing this is beyond the scope of our support and will lead to unexpected errors like you have described. If your database is corrupted, please shut down NinjaTrader and navigate to Documents/NinjaTrader 7 and rename the folder named 'db' to 'dbOLD', then restart NinjaTrader to create a new db folder.

            If there is anything else I may assist with please let me know.
            Chris L.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_ChrisL View Post
              Hello calhawk01,

              Thanks for the follow up.

              That is very interesting. What tool did you use to do this?

              Unfortunately, doing this is beyond the scope of our support and will lead to unexpected errors like you have described. If your database is corrupted, please shut down NinjaTrader and navigate to Documents/NinjaTrader 7 and rename the folder named 'db' to 'dbOLD', then restart NinjaTrader to create a new db folder.

              If there is anything else I may assist with please let me know.
              Chris, i'm using a program called "SDF viewer."

              I'm still trying to understand the variables that are being held in NT's .sdf data base. What are the min/max values representing? Clearly they cannot be the min/max values that would be used to calculated MAE/MFE. I'm attaching a screenshot of a trade example that I recently executed in NT, and the .sdf file created the following:

              entry= .70785 (as expected)
              time = same as execution time
              min = .7055
              max = .7098

              The min/max values don't related to the daily high/low (the day i executed the trade 10/9 nzdusd).

              So again, any idea you can ask your database people to see where these values are coming from? Bc it seems, my original reason for doing this is to: input my entry and exit prices from a different database, and then NT finds the min/max prices between my entry and exit price to calculate the MAE/MFE. If the above min/max are not related to the overall min/max prices during the entire length of my trade (that's good news) because NT must have some other way to finding out the min/max values, and hence, I can just edit the database by entry my entry/exit time and entry price and exit price.
              Attached Files

              Comment


                #8
                Hello calhawk01,

                Thanks for the follow-up.

                This information is not documented and therefore not supported. Again, we do not recommend editing the database in this way since it is very easy to break something, and could lead to a bad user experience.

                Please let me know if I may be of further assistance.
                Chris L.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by bmartz, 03-12-2024, 06:12 AM
                4 responses
                31 views
                0 likes
                Last Post bmartz
                by bmartz
                 
                Started by Aviram Y, Today, 05:29 AM
                4 responses
                12 views
                0 likes
                Last Post Aviram Y  
                Started by algospoke, 04-17-2024, 06:40 PM
                3 responses
                28 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by gentlebenthebear, Today, 01:30 AM
                1 response
                8 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by cls71, Today, 04:45 AM
                1 response
                7 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Working...
                X