Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Event for user parameter change

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

    Event for user parameter change

    Is there an event that fires when a parameter in the indicator dialog is changed?

    ParamA can be any value. ParamB can never be less than ParamA. When a value is entered for ParamA that is greater than ParamB I want to Set ParamB equal to ParamA.

    I found other threads about similar topics, however, none exactly like this. My guess is that this is unsupported.

    #2
    Hello bernie_c,

    You can call a value of a public object like a plot or int or bool from an indicator. However, you cannot have that indicator trigger an action in the script calling the indicator directly. You would need to set the value, and detect the change in the script calling the indicator.

    Basically, call the indicator, save that value to a variable. Then call the indicator repeatedly and see if your variable value is equal to the indicator value. If they are not, then there has been a change.
    Last edited by NinjaTrader_ChelseaB; 02-27-2015, 03:16 PM.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by bernie_c View Post
      Is there an event that fires when a parameter in the indicator dialog is changed?

      ParamA can be any value. ParamB can never be less than ParamA. When a value is entered for ParamA that is greater than ParamB I want to Set ParamB equal to ParamA.

      I found other threads about similar topics, however, none exactly like this. My guess is that this is unsupported.
      The properties will follow this paradigm.

      Code:
      	[RefreshProperties(System.ComponentModel.RefreshProperties.All)]
              public int ParamA
              {
                  get { return paramA; }
                  set { paramA = Math.Min(1, value); }
              }
      
              public int ParamB
              {
                  get { return paramB; }
                  set { paramB = Math.Max(ParamA, value); }
              }

      Comment


        #4
        Exactly what I was looking for.

        Comment

        Latest Posts

        Collapse

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