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

can I read parameters from other indicators on the chart?

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

    can I read parameters from other indicators on the chart?

    is there a way to read the parameters from an indicator that is on the chart?

    I wrote a signal indicator that looks at a variety of other indicators and when I get a combination of conditions that I have as filters in the signal indicator, it plots a vertical line on the chart so I can evaluate whether the combination gives me a good signal. This part works fine (see attached image)

    One thing that would help would be if I could read the parameters of the indicators on the chart and make sure my signal indicator was using the same parameters. For example, I might have my MACD window set to 12, 26, 9. But I left 10, 20, 30 as the MACD parameters for my signal indicator. then when I look at the signal indicator it doesn't makes sense.

    I can change them in the signal indicator to match, but a lot of times its easier to play with the chart indicator so I can see the results of the change.

    thanks for the help






    #2
    Start here.

    Comment


      #3
      Hello cre8able,

      Thanks for your post.

      ChartControl.Indicators collection will represent all indicators that are added to the chart. Extracting what the indicator parameters are would involve checking what the public properties of each indicator are.

      There would not be a good way to check the public properties of an indicator unless you knew the exact names of the public properties of each indicator you are checking, or if you used Reflection. Reflection is an advanced C# concept which would be outside our scope of support for providing assistance with NinjaScript.

      If any other community members want to share show you can use Reflection to print out public properties and their values, they are welcome to chime in and provide that detail.

      We look forward to assisting.
      JimNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by skorpn, Today, 01:28 AM
      0 responses
      5 views
      0 likes
      Last Post skorpn
      by skorpn
       
      Started by ETFVoyageur, Today, 12:52 AM
      0 responses
      6 views
      0 likes
      Last Post ETFVoyageur  
      Started by Board game geek, Yesterday, 02:20 AM
      2 responses
      21 views
      0 likes
      Last Post Board game geek  
      Started by jackiegils, Yesterday, 11:05 PM
      0 responses
      7 views
      0 likes
      Last Post jackiegils  
      Started by cre8able, 05-09-2024, 09:15 PM
      2 responses
      17 views
      0 likes
      Last Post cre8able  
      Working...
      X