Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

So Many Indicator

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

    So Many Indicator

    Hello,

    I have a system and this system contains 6 indicators. Some indicators uses price values for input but at the same time needs other indicator output for the current bar. For clearify suppose we have an X indicator and X uses Y indicator like this Y[0] at BarUpdate method.
    So i added Y indicator via Add command at X's initialize method. Also Y indicator is adding to chart stand alone too.

    Here is my question. How Ninja interpret this situation? I mean, It is first calculate Y[0] and then draw it on chart and send same result to X and draw X output chart too. Or calculate Y[0] and draw it on the chart then calculate Y[0] again but this time for X.

    I'm interesting this, because i don't want to face any performans penalty at the future.

    Regards.

    #2
    aytacasan,

    You can't Add() another indicator into an indicator. I assume you did the Add() from a strategy.

    What happens when you Add() from a strategy it creates an instance of that indicator on the chart. This same instance is used for your strategy's accessing of the indicator. There will be no penalty hit.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Hello again,

      I don't know before that we don't use indicator into other indicator via add method. Thaks for your warning. My question is not related strategy. But yet we use indicator into other indicator like this:

      Y indicators OnBarUpdate()
      X x = new X();
      Y[0] = X[0] * 2; (If there is an most effective way for this please inform me)

      Suppose we added both of X and Y indicators to chart. What is the Ninja's behavier this situation. I mean Ninja calculate X two times for draw X indicator to chart and for draw Y indicator? Or Ninja calculate X value current bar one time and use this value two times?

      Thanks.
      Last edited by aytacasan; 11-12-2010, 05:19 PM.

      Comment


        #4
        Two separate instances; it will be ran twice under such a scenario.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        579 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        334 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        554 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        551 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X