Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Write the values of an indicator to a text file

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

    Write the values of an indicator to a text file

    Dear NinjaTraders,

    I am using the ninjascripts provided by this thread:

    http://www.ninjatrader-support2.com/...ead.php?t=3477

    and they are working very well.

    I would like those scripts to also write the values of indicators, for example, the moving averages of the MACD.

    Is this possible?

    Is there any reference materials explaning how to do this?

    Many thanks,

    #2
    Hello,

    Do you mean write the indicator value to the text file? If so, yes, it is done just like the other things you write to the text file, but write the value that is found via this:
    MACD(
    12, 26, 9)[0]
    DenNinjaTrader Customer Service

    Comment


      #3
      Dear Ben,

      Thank you for your reply.

      This is what I meant, but how would you do it for "any" indicator displayed on the chart, like a general formula that writes the values of the indicators displayed in Panel 1, 2, 3... regardless that they are MACD, EMA, etc.

      Many thanks,

      Comment


        #4
        Hello mat1024,

        You can't set it up to write indicator data in specific panels. You have to state which indicator you would like to write to the file. This means writing out the code for the values you want written.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          yeah, so you have to create a new line of code for each indicator. I have a system that does this for 180 indicators. I put it in excel and run vba code on it to develop statistical patterns. Then I implement those patterns in strategies in NS.

          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
          332 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