Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Merge Back Adjusted & access to Non Adjusted price level

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

    Merge Back Adjusted & access to Non Adjusted price level

    Hello,
    Developing longer term strategies using Merge Back Adjusted data.. This is obviously the right and only way for most indicator calculations such as SMAs and correct PL results from back tests.
    However for various reasons I need to be able to access the real non adjusted price level of the contract at the bar close.
    Is there a way to do this?
    thanks


    #2
    Is there a way that i can copy the data or print it it to a file.. change the name mabye and reimport it as a manual dataseries that bypasses the ninjatrader global Merge Back Adjustement​?
    daily prices would be fine.

    Comment


      #3
      Hello madb123,

      Unfortunately there would not be a way to do that without turning off the merge back adjust feature. The data that your script has access to would all be modified to be adjusted if you have that setting enabled. You could export historical data to file and then manually parse that in your code however that would be a manual process where you have to use the historical data manager any time you needed to update the exported data.You would also have to turn merge back adjusted off and reload data before doing that and then switch it back and reload data again after the export.
      JesseNinjaTrader Customer Service

      Comment


        #4
        Hi Jesse,
        So i tried this:
        1- export the ES contract daily last values into a text file:
        Click image for larger version

Name:	image.png
Views:	30
Size:	8.8 KB
ID:	1333805
        2- create a new manual instrument Stock ESREAL
        3- Change the exported file name to ​ESREAL.Last.txt
        4- Import the file as ESREAL instrument.

        The above worked perfectly and i can display ESREAL on the chart simultaneously with ES back adjusted continuous contract.

        The problem is that even though in the screen shot above, i exported data from 30/01/2020 to 05/02/2025, the text file data only contains the latest contract us there a way to extract 5 years into one text file at once? thanks
        Click image for larger version

Name:	image.png
Views:	37
Size:	17.5 KB
ID:	1333806

        Comment


          #5
          Hello madb123,

          When exporting you are selecting a specific contract so you would have to manually combine the exported data if you wanted to include other contracts.
          JesseNinjaTrader Customer Service

          Comment


            #6
            thanks Jesse, but thats not an option for me as i need to do that on many instruments and a longer period of time..
            Is it possible if i make a strategy that just uses writer.WriteLine or something similar to write to write the text file for me if i run the strategy once on each instrument?
            I already use a addon that writes the unrealised profit/ loss on each bar close to an excel.. so i can convert that add on.

            The question is what are these values in the text file? What values do i need to supply from the strategy to the AddOn to print these values in order?
            20241216;6125.5;6163.75;6122;6154;1871975
            20241217;6150.25;6152.75;6114.25;6127.25;1874532
            20241218;6126.75;6148;5906.5;5940.25;2604006
            20241219;5949.5;6005.25;5931.25;5934;2391121
            20241220;5944.5;6050.75;5866;6001.75;2340873
            20241223;6001.75;6043;5965;6036;1406019
            20241224;6037.75;6099.5;6030;6098;634201​

            Thanks

            Comment


              #7
              Hello madb123,

              Yes you could create an indicator that writes data to a file. The output you provided appears to be data similar to how the historical data manager exports data, you can find details on the values for the exports here: https://ninjatrader.com/support/help...AndDataFormats
              JesseNinjaTrader Customer Service

              Comment


                #8
                founded everything needed for this and links here:

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by rubiijonson, Today, 01:02 AM
                0 responses
                4 views
                0 likes
                Last Post rubiijonson  
                Started by fkronloff, Today, 12:25 AM
                0 responses
                3 views
                0 likes
                Last Post fkronloff  
                Started by Zadomani, Yesterday, 11:39 PM
                0 responses
                10 views
                0 likes
                Last Post Zadomani  
                Started by ToNovy, 01-27-2025, 11:22 PM
                20 responses
                197 views
                0 likes
                Last Post ToNovy
                by ToNovy
                 
                Started by hypercube, 03-07-2025, 12:22 AM
                2 responses
                38 views
                0 likes
                Last Post hypercube  
                Working...
                X