Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Set parameters Min.Value and Max.Value in strategy

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

    Set parameters Min.Value and Max.Value in strategy

    When optimizing you can set Min/Max/increment in parameters. It standard sets all to 1. How can I change the default values? For example that it shows the min and max values already (as below)..


    #region Properties
    [Description("ATR multiplier")]
    [GridCategory("Parameters")]
    public double ATR_multiplier
    {
    get { return a; }
    set {

    a = Math.Min(1, value);
    a = Math.Max(25, value);

    }
    }

    #2
    Originally posted by no111 View Post
    When optimizing you can set Min/Max/increment in parameters. It standard sets all to 1. How can I change the default values? For example that it shows the min and max values already (as below)..


    #region Properties
    [Description("ATR multiplier")]
    [GridCategory("Parameters")]
    public double ATR_multiplier
    {
    get { return a; }
    set {

    a = Math.Min(1, value);
    a = Math.Max(25, value);

    }
    }
    Properties are evaluated at runtime, so you cannot do what you are seeking to do other than by saving the parameters of the optimization itself. So, the parameters are saved as attributes of the optimization, not of the object that you are attempting to optimize.

    Right-click on the parameters in the Strategy Analyzer, and click on the only option that pops up.

    Comment


      #3
      Hello no111,

      Thank you for your post.

      Koganam is correct, right click in the parameters section after setting the Min and Max for the optimization and then select 'Set Default for 'StrategyName''.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      153 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      89 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      133 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      127 views
      1 like
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      107 views
      0 likes
      Last Post CarlTrading  
      Working...
      X