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 llanqui, Today, 03:53 AM
      0 responses
      6 views
      0 likes
      Last Post llanqui
      by llanqui
       
      Started by burtoninlondon, Today, 12:38 AM
      0 responses
      10 views
      0 likes
      Last Post burtoninlondon  
      Started by AaronKoRn, Yesterday, 09:49 PM
      0 responses
      15 views
      0 likes
      Last Post AaronKoRn  
      Started by carnitron, Yesterday, 08:42 PM
      0 responses
      11 views
      0 likes
      Last Post carnitron  
      Started by strategist007, Yesterday, 07:51 PM
      0 responses
      14 views
      0 likes
      Last Post strategist007  
      Working...
      X