Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Extract indicator data - not just price

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

    Extract indicator data - not just price

    hello,

    This is relevant to the topic "Exporting Price and Indicator Data from chart" but I am creating a new one in case there is an update or a new tool that allows you to do that.

    So, similar to the old post, is it possible to export indicator data and not just prices? In the old topic, that was possible only for specific indicators. But I am interested in exporting the entire chart information.

    thanks


    #2
    Hello space_trader,

    Yes, in the string being written to file, use the indicator value instead of the price series value.

    Below is a link to an example of writing to a text file.
    Citizens of the NinjaTrader Community, A common question we hear from clients is 'why are results from backtest different from real-time or from market replay?'. Live orders are filled on an exchange with a trading partner on an agreed upon price based on market dynamics. Backtest orders are not using these market dynamics.

    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      hello Chelsea,

      I have some questions.

      First of all, the "Important related documentation" links from link



      no longer work. Maybe consider updating them?

      And what about the 2nd link you provided? I don't think is related so maybe it's a mistake? Please confirm.

      So, I am not really familiar with StreamWriter and I went through the example file in the first link you provided. In line 50 I see:

      sw.WriteLine(Time[0] + "," + Open[0] + "," + High[0] + "," + Low[0] + "," + Close[0]); // Append a new line to the file

      Is this the part of the code I need to change and add the indicator I need to extract?

      And finally, how do I use this script? I imported it to NT and then how can I make it work? How do I activate it, where it extracts the data etc.

      Thanks a lot!

      Comment


        #4
        Hello space_trader,

        Thanks for notifying us of that. I've reported to our IT to get that fixed.

        And yes, you are correct. The sw.WriteLine() writes to the file. The string is the information being written. Instead of the Open/High/etc, write whatever values you want, such an indicator value.

        Indicators can be applied to a chart by right-clicking the chart -> selecting Indicators -> in the Available list select the indicator -> click add to add the configured area -> click OK.

        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hello space_trader,

          You've posted in the NinjaTrader7 General Development area so if you are using NT7 then you can use the previously referenced streamwriter example indicator to write the price data and anything else that you manually code in.

          If you are really working with NinjaTrader8 then you can download an indicator that will automatically read and write the data on a chart, including all indicator values on a bar by bar basis to a CSV file that can be imported to a spreadsheet.. It will automatically read each indicator so it is very easy to use. Here is a link to the free download in the NT user apps misc section: https://ninjatraderecosystem.com/use...ad/charttocsv/

          I'm not aware of an NT7 equivalent. If you are using NT7 this would be just one more reason to update to NinjaTrader8.

          Comment


            #6
            hello Tasker-182,

            Indeed, I am using NT8. I posted in the wrong category.

            Thanks

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            574 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            333 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            553 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            551 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X