Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 jeronymite, 04-12-2024, 04:26 PM
      3 responses
      40 views
      0 likes
      Last Post jeronymite  
      Started by bill2023, Today, 08:51 AM
      2 responses
      16 views
      0 likes
      Last Post bill2023  
      Started by sidlercom80, 10-28-2023, 08:49 AM
      167 responses
      2,260 views
      0 likes
      Last Post jeronymite  
      Started by warreng86, 11-10-2020, 02:04 PM
      7 responses
      1,362 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by Perr0Grande, Today, 08:16 PM
      0 responses
      5 views
      0 likes
      Last Post Perr0Grande  
      Working...
      X