Announcement

Collapse
No announcement yet.

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.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      128 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      73 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      116 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      109 views
      1 like
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      88 views
      0 likes
      Last Post CarlTrading  
      Working...
      X