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

How to access the internal structure of an indicator?

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

    How to access the internal structure of an indicator?

    Hi Folks,

    I have an indicator which segments the price bars into clusters of Red and blue. Along the movement of price, a maximum of 4 clusters are maintained.

    How can I have access to those clusters in the indicator? It is not like a conventional indicator, where each price bar has its corresponding indicator value.

    Thank you!



    Best Regards
    David

    #2
    The quick & dirty way is,
    Make the variables 'public' then you would access it just like a public property,

    MyIndy(arg1, arg2).MyGlobal

    [Edit: I say 'quick & dirty' because it's not really a best practice technique but it's
    the least amount of editing. It is completely legal code, but still, it's considered
    'poor style' vs the 'normal' way C# is coded -- ie, don't do this in commercial
    code, but for homegrown scripts, it's a beautiful thing. ]
    Last edited by bltdavid; 08-27-2020, 11:14 AM.

    Comment


      #3
      Hello sinpeople, thanks for your post.

      It depends on how the indicator is developed. If these clusters are purely visual, you need to set up a public series and fill that series with the values you need. We have an example here on exposing indicator values as a public series:
      https://ninjatrader.com/support/help...alues_that.htm

      Please let me know if I can assist any further.
      Last edited by NinjaTrader_ChrisL; 08-27-2020, 11:23 AM.
      Chris L.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by andrewtrades, Today, 04:57 PM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by chbruno, Today, 04:10 PM
      0 responses
      6 views
      0 likes
      Last Post chbruno
      by chbruno
       
      Started by josh18955, 03-25-2023, 11:16 AM
      6 responses
      436 views
      0 likes
      Last Post Delerium  
      Started by FAQtrader, Today, 03:35 PM
      0 responses
      7 views
      0 likes
      Last Post FAQtrader  
      Started by rocketman7, Today, 09:41 AM
      5 responses
      19 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X