Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator within an Indicator

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

    Indicator within an Indicator

    Is is possible to "Add()" an indicator within another indicator?
    Or is this limited to adding the indicator to a Strategy.
    Your sample strategies show adding RSI and SMA but I have not been able to get this to work within another indicator.
    Trying to keep things in indicators so that I can use ChartTrader.
    thanks,
    Gary

    #2
    Hello,

    Thanks for the forum post.

    Wanted to double check and ask why you would want to Add() an indicator in an indicator.

    Just want to make sure you understand that Add() is only a visual tool and it is not needed to access other indicator values. All Add() does is simply add the indicator on the chart the same you would be right clicking and selecting indicators which is the easiest way to add these on.

    Otherwise you can simply call the indicator name in OnBarUpdate() to access it.


    SMA(15)[0]; Will output the indicator SMA in your current indicator.

    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      Brett,
      I am trying to consolidate a couple of indicators within a single one so that I do not have add three or four when I update my charts.
      Most of these have multiple plots and shaded regions and I do not want to take the time to add the code to display these details.

      I do access the indicator values in OnBarUpdate(), I just do not want to manage the drawing of the various plots and regions.

      I have gotten this to work in a Strategy but still struggling with the Indicator. Overload issue.

      Understand?

      Comment


        #4
        Hello,

        Understood, no way to do this inside of indicator. Other then manually cut and copying the code into your current indicator uunfortunately.

        However this is also what templates are for. Suggest you create a template to do this instead of loading it via the indicator.

        Let me know if I can be of further assistance.
        BrettNinjaTrader Product Management

        Comment


          #5
          Thanks Brett,
          You answered my question.
          I was hoping not to have to add all the code into a single indicator vs. the template.
          Will use the template until I can figure out a different approach.
          Gary

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          601 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          347 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          559 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          558 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X