• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.


No announcement yet.

Partner 728x90


Incorrect Profit Value in strategy analyzer

  • Filter
  • Time
  • Show
Clear All
new posts

    Incorrect Profit Value in strategy analyzer

    Hello NT Support,

    I imported historical data for CL, processing a file named QMNT.txt, while I had already created an instrument named QMNT with point value = 1000 and tick=0,01. Now, the strategy analyzer reports profits without multiplying the number of ticks won or lost times the point value. Any hint where I could have gone wrong? It seems like I did'nt "link" the data downloaded to the instrument, but I don't know how to verify that it is linked. Or better I don't know how to verify that that istrument selected into the strategy analyzer (or graph or whatsoever) is "linked" to the historical datas update into the DB,

    here is the screenshot
    Attached Files


      Hello afoschini,

      Thanks for your post.

      I may not understand the full context of your goal, but it looks like you are trying to have the Strategy Analyzer perform different calculations based off of your modified instrument values.

      You are able to see the trades made when selecting the instrument so you know the data is being pulled in and is being backtested for your custom instrument. Metrics involving currency may not be different as you are looking at the same data/price points as copied from the historical data. You could change your Strategy Analyzer to display information in points by selecting Points within the Display Selector, and then your modified point value would be used to generate the metric in Points.

      Please let us know if we can be of further assistance.
      JimNinjaTrader Customer Service


        Hello Jim,
        Thanks for your effort to understand, but it is clear I did'nt gave you all the elements. Let me sum it up:

        - I want to backtest a strategy using the historical data I bought at Pitrading.
        - So I used the Pitrading tool to trasform the original data into a format that is right for Ninja (QMNT.txt)
        - Then I created a custom instrument giving it the same name (QMNT) and setting parameters identical to CL contracts (i.e. point value = 1000$, tick=0,001)
        - Then I loaded the QMNT.txt file into NT via the loading procedure.
        - Finally I launched the backtest via strategy analyzer, but I see that the amount in dollars don't take account the money conversion factor (i.e. each tick gained must translate into 10$ gained).

        I am sure I went wrong somewhere.... any clue?

        Thanks as always.


          Jim I got it but still don't know how to fix it. When I load the QMNT.txt file, NT is not able to associate it to the instrument I previously created and so it creates a new one, called QMNT but as a stock type, with point value =1. So how can I make NT make the correct association? If I rename QMNT.txt into QMNT.last.txt it says that "0 records were succesfully loaded"....


            Hello Andrea,

            As our office is closing soon, I will not be able to look into this more until next week.

            I may suggest in the meantime to make sure that your custom instrument is configured as a Futures contract and has the same rollovers entered in the Contract Months Collection so it is in agreeance with the CL instrument.

            Editing Instruments - https://ninjatrader.com/support/help...nstruments.htm

            If the instruments are identical and the you import data from a file named "QMNT 03-19.Last.txt" the data should be imported to the Futures instrument you created.

            I look forward to assisting you further next week.

            Have a good weekend!
            JimNinjaTrader Customer Service


              Hi Jim, I went on studying trough the weekend and realized I was following a bad practice of operation. Please let me restate what I want.

              I want to backtest a strategy I created for CL. I have historical data in NinjaTrader text format since 2010 through July 2018. How can I do to import the historical data so that when I do backtesting (or visualize data on chart) NT gets older data from historical data downloaded and more recent data from my data provider (kinetic)?.


                Hello Andrea,

                Thanks for clarifying.

                You shouldn't have an issue importing that data to the same CL instrument using the full expiry (I.E. "CL 03-19.Last.txt") for the historical data file name for the data associated with the 03-19 contract month, and then to import the data for each prior contract month with the file name reflecting the contract period where that data resides. For example: "CL 02-19.Last.txt" "CL 01-19.Last.txt" etc. This would be most consistent for how NinjaTrader organizes this data.

                The data will then reside on your platform with the proper instrument and will be able to be charted and backtested as if you had downloaded that CL data from your data provider. Each contract period will be stitched together following your Merge Policy (Control Center > Options > Market Data.) Any data that is available from the data provider can then replace your manually imported data when you use the Reload All Historical data operation. Data that cannot be replaced by your provider will not be removed with this operation. This should give you the desired behavior to have your data provider prioritized over what you have already should there be any overlap in availability.

                Further reading on Merge Policy can be found here - https://ninjatrader.com/support/help...rge_policy.htm

                I'll also link you to our Importing data page of the help guide which covers formats and what NinjaTrader expects when importing.

                Importing data - https://ninjatrader.com/support/help...?importing.htm

                I look forward to being of further assistance.
                JimNinjaTrader Customer Service


                Latest Posts


                Topics Statistics Last Post
                Started by akuntysh, Today, 04:56 AM
                1 response
                Last Post NinjaTrader_Jesse  
                Started by GLFX005, Today, 09:17 AM
                2 responses
                Last Post GLFX005
                by GLFX005
                Started by pjsmith, Today, 08:43 AM
                5 responses
                Last Post pjsmith
                by pjsmith
                Started by guillelagoria, Today, 07:26 AM
                3 responses
                Last Post NinjaTrader_ChristopherD  
                Started by aprendiz, Today, 08:06 AM
                1 response
                Last Post NinjaTrader_Jesse