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 helpwanted, Today, 03:06 AM
      1 response
      10 views
      0 likes
      Last Post sarafuenonly123  
      Started by Brevo, Today, 01:45 AM
      0 responses
      8 views
      0 likes
      Last Post Brevo
      by Brevo
       
      Started by aussugardefender, Today, 01:07 AM
      0 responses
      5 views
      0 likes
      Last Post aussugardefender  
      Started by pvincent, 06-23-2022, 12:53 PM
      14 responses
      242 views
      0 likes
      Last Post Nyman
      by Nyman
       
      Started by TraderG23, 12-08-2023, 07:56 AM
      9 responses
      385 views
      1 like
      Last Post Gavini
      by Gavini
       
      Working...
      X