Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator Parameter that defaults to same parameter used by another Indicator

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

    Indicator Parameter that defaults to same parameter used by another Indicator

    Hi

    I have a number of custom indicators, is it posible to on the Initialise method to set the default value of a parameter to the value used buy one of my other indicators if it is loaded?

    I have tried the following

    protected override void Initialize() {

    Overlay = true;
    if (strength == -1) {
    strength = 2;
    foreach (Indicator ind in Indicators) {
    if (ind.GetType() == typeof(HiLowSwing)) {
    strength = (ind as HiLowSwing).Strength;
    }
    }
    }
    }

    The Indicators collection is empty, can i reference the indicators collection loaded on the chart?

    Thanks

    Mike

    #2
    Hi upshon,

    You'll need to access one from the OBU() as seen in this sample:
    TimNinjaTrader Customer Service

    Comment


      #3
      Hi Tim

      I assume buy OBU() you are referring to OnBarUpdate()?

      What I want to do is to set the default in the Initialize() method so when the properties dialog for the indicator pops up when you add the indicator the default is set there, this gives the user the ability to override if required.

      So what I am asking is how would I access the already loaded Indicators from the Initialize() method.
      Thanks

      Mike

      Comment


        #4
        Hello,

        This would be unfortunately not possible.

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

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        599 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        344 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
        558 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        557 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X