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 Harry, 05-02-2018, 01:54 PM
      10 responses
      3,203 views
      0 likes
      Last Post tharton3  
      Started by cre8able, Yesterday, 01:16 PM
      3 responses
      11 views
      0 likes
      Last Post cre8able  
      Started by ChartTourist, Today, 08:22 AM
      0 responses
      6 views
      0 likes
      Last Post ChartTourist  
      Started by LiamTwine, Today, 08:10 AM
      0 responses
      2 views
      0 likes
      Last Post LiamTwine  
      Started by Balage0922, Today, 07:38 AM
      0 responses
      5 views
      0 likes
      Last Post Balage0922  
      Working...
      X