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

Incorrect Profit Value in strategy analyzer

Collapse
X
 
  • 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,
    Thanks


    #2
    here is the screenshot
    Attached Files

    Comment


      #3
      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

      Comment


        #4
        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.
        Andrea

        Comment


          #5
          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"....

          Comment


            #6
            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

            Comment


              #7
              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)?.
              Thanks.
              Andrea

              Comment


                #8
                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

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by agclub, Yesterday, 08:57 PM
                2 responses
                16 views
                0 likes
                Last Post agclub
                by agclub
                 
                Started by cre8able, 04-17-2024, 04:16 PM
                6 responses
                55 views
                0 likes
                Last Post cre8able  
                Started by Mindset, 05-06-2023, 09:03 PM
                13 responses
                293 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by kaywai, 09-01-2023, 08:44 PM
                4 responses
                600 views
                0 likes
                Last Post joselube001  
                Started by dpolyakov, 03-29-2024, 11:30 AM
                3 responses
                135 views
                2 likes
                Last Post sonia0101  
                Working...
                X