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

Accessing Indicator Values

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

    Accessing Indicator Values

    Hi,

    I want to access the values from an indicator of the current chart. I would have a bollinger on a volume chart and i want the lower and upper values onbarupdate. I don't want to code the bollinger settings, the indicator should know what the charts bollinger is set to and return the current bollingers values for lower and upper. all the methods i have seen require me to set the bollinger properties in the code. The bollinger properties will be set by user via the chart, the indicator has to get the values of that bollinger, I don't want to have to recode the bollinger settings in the indicator that gets the values. When the bollinger properties are changed on the chart the indicator should get the values of the new bollinger. I wanted to use chartcontrol.indicators, but NT doesn't offer support on that. Any other ways?

    #2
    floyd084, welcome to our forums - your understand is correct here. What you could look into would be doing this via a strategy, as this could add indicators simply for display and you could then preset your Bollinger parameters as desired.

    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by floyd084 View Post
      Hi,

      I want to access the values from an indicator of the current chart. I would have a bollinger on a volume chart and i want the lower and upper values onbarupdate. I don't want to code the bollinger settings, the indicator should know what the charts bollinger is set to and return the current bollingers values for lower and upper. all the methods i have seen require me to set the bollinger properties in the code. The bollinger properties will be set by user via the chart, the indicator has to get the values of that bollinger, I don't want to have to recode the bollinger settings in the indicator that gets the values. When the bollinger properties are changed on the chart the indicator should get the values of the new bollinger. I wanted to use chartcontrol.indicators, but NT doesn't offer support on that. Any other ways?
      You may want to read this thread to show you how to determine what indicators are on the chart. After that it is simply a matter of querying the properties of the relevant indicator. The code shows how I queried the name. Once you have the name, you use standard OOP syntax to access the properties that you want to read.

      ref: http://www.ninjatrader.com/support/f...ad.php?t=52225

      Comment


        #4
        Further help needed.

        Originally posted by koganam View Post
        You may want to read this thread to show you how to determine what indicators are on the chart. After that it is simply a matter of querying the properties of the relevant indicator. The code shows how I queried the name. Once you have the name, you use standard OOP syntax to access the properties that you want to read.

        ref: http://www.ninjatrader.com/support/f...ad.php?t=52225

        Do you have any example codes? Im not a programmer by trade so im not very familiar with syntax, have to trial and error everything. I can seem to get a string that shows "upper band" or "lower band" but not the actual numbers.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by TheWhiteDragon, 01-21-2019, 12:44 PM
        4 responses
        543 views
        0 likes
        Last Post PaulMohn  
        Started by GLFX005, Today, 03:23 AM
        0 responses
        3 views
        0 likes
        Last Post GLFX005
        by GLFX005
         
        Started by XXtrader, Yesterday, 11:30 PM
        2 responses
        12 views
        0 likes
        Last Post XXtrader  
        Started by Waxavi, Today, 02:10 AM
        0 responses
        7 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by TradeForge, Today, 02:09 AM
        0 responses
        14 views
        0 likes
        Last Post TradeForge  
        Working...
        X