Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Changing parameter settings of an indicator

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

    Changing parameter settings of an indicator

    Hi together,

    is it possible to change the settings of an indicator, which is added in the initialize method, during runtime?
    I'd like to modify a setting of an indicator based on some market conditions.
    Let's say, if the momentum is above 0.1 I'd like to use an offset factor for calculating the SAR indicator which is plotted on the chart. The momentum indi is not visible.

    Thanks for comments and helping!

    #2
    Hello Cicondo,

    Thank you for your post.

    You can do this, but all the logic belongs in OnBarUpdate()

    The concept is setting your plots depending on conditional statements.

    Code:
     
    if (Momentum(20)[0] > .1)
        Plot0.Set(sarSettingsHere);
     
    else
        Plot0.Set(otherSarSettingsHere);
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    576 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
    553 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