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

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.

    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.

        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 samish18, 04-17-2024, 08:57 AM
          16 responses
          55 views
          0 likes
          Last Post samish18  
          Started by arvidvanstaey, Today, 02:19 PM
          3 responses
          9 views
          0 likes
          Last Post NinjaTrader_Zachary  
          Started by jordanq2, Today, 03:10 PM
          2 responses
          8 views
          0 likes
          Last Post jordanq2  
          Started by traderqz, Today, 12:06 AM
          10 responses
          18 views
          0 likes
          Last Post traderqz  
          Started by algospoke, 04-17-2024, 06:40 PM
          5 responses
          47 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X