Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Optimization Test

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

    Optimization Test

    I was trying to do an optimization back test. Any idea how do I make some of these parameters optimized (see example below) ? I saw them once with options to min,max and increment and now can't see it. Are there any settings?




    #2
    Hello ark321,

    Thanks for your post.

    You would need to make user-defined inputs instead of variables for the parameters you would like to optimize.

    Are you using the [NinjaScriptProperty] Attribute for the parameters you would like to optimize?

    The NinjaScriptPrperty Attribute determines if the following declared property should be included in the NinjaScript object's constructor as a parameter.

    Something you could consider is using the Strategy Builder to created user-defined inputs on the Inputs and Variables screen. Then, you could click the 'View code' button to see the generated code used to create these user-defined inputs.

    See the help guide page below for more information.
    NinjaScriptProperty Attribute: https://ninjatrader.com/support/help...yattribute.htm
    Creating User-Defined Input Parameters: https://ninjatrader.com/support/help...d_input_pa.htm

    Let us know if we may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Thanks for your reply. This is what I have for Target 1 (in the example screen shot above).


      [NinjaScriptProperty]
      [Description("")]
      [Range(0,Int32.MaxValue)]
      [Display(ResourceType = typeof(Custom.Resource), Name = "Profit Target 1", GroupName = "Profit Targets", Order = 6)]
      public int ProfitTarget1
      {
      get;set;
      }

      Am I missing anything? I still do not see this as optimized parameter

      Comment


        #4
        Hello ark321,

        Thanks for your note.

        I have created a user-defined input for ProfitTarget1 in a test strategy in the Strategy Builder and clicked the 'View code' button to see the generated code. See below.

        Code:
        [NinjaScriptProperty]
        [Range(0, int.MaxValue)]
        [Display(Name="ProfitTarget1", Order=3, GroupName="Parameters")]
        public int ProfitTarget1
        { get; set; }
        When this strategy is added to a Strategy Analyzer window, I do see the property available for optimization. See the attached screenshots.

        Please create a user-defined parameter in the Strategy Builder Inputs and Variables screen, click the 'View code' button to see the generated code, and then copy that user-defined input into your strategy and add the strategy to the Strategy Analyzer.

        Let us know if we may assist further.
        Attached Files
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment


          #5
          Thanks a lot.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          67 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          142 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          76 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          47 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          51 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X