• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

strat analyzer goofiness

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

    strat analyzer goofiness

    Hi,
    Currently,
    If I set up 2 parameters
    Code:
     [Range(1, int.MaxValue), NinjaScriptProperty]
     [Display(ResourceType = typeof(Custom.Resource), Name = "Item 1", Description = @" Item 1Stop Ticks", Order = 0, GroupName = "NinjaScriptParameters")]
     public int Item1ST
     {
     get { return Item1StopTicks; }
     set { Item1StopTicks = Math.Max(1, value); }
     }
      
     [Range(1, int.MaxValue), NinjaScriptProperty]
     [Display(ResourceType = typeof(Custom.Resource), Name = "Item2", Description = @" Item2Target Ticks", Order = 1, GroupName = "NinjaScriptParameters")]
     public int Item2TT
     {
     get { return Item2TargetTicks; }
     set { Item2TargetTicks = Math.Max(1, value); }
     }
    They appear in the order of the "Order" I set in the analyzer.
    They also appear in that order in the results where it shows the parameters used for a particular run.

    Now, here's the fun part. If I reverse where the parameters appear in my code... for example ...
    Code:
     [Range(1, int.MaxValue), NinjaScriptProperty]
     [Display(ResourceType = typeof(Custom.Resource), Name = "Item2", Description = @" Item2Target Ticks", Order = 1, GroupName = "NinjaScriptParameters")]
     public int Item2TT
     {
     get { return Item2TargetTicks; }
     set { Item2TargetTicks = Math.Max(1, value); }
     }
      
     [Range(1, int.MaxValue), NinjaScriptProperty]
     [Display(ResourceType = typeof(Custom.Resource), Name = "Item 1", Description = @" Item 1Stop Ticks", Order = 0, GroupName = "NinjaScriptParameters")]
     public int Item1ST
     {
     get { return Item1StopTicks; }
     set { Item1StopTicks = Math.Max(1, value); }
     }
    Item 1 is PHYSICALLY below Item 2.
    In this case, the parameters display correctly in the settings, but they are not in the same order in the results parameters. This is a pain. It may not seem like much with 2 parms, but with a bunch it gets ugly. Now the easy solution is to make the code match the order I want them to appear and I've done this. However, it's definitely confusing if later on I need to insert a parm in the middle. and I forget to position the physical code correctly. I think NT should order them in the order specified.
    My 2 cents ... Ed

    #2
    Hello Ed,

    Thank you for writing in.

    This behavior allows you to set the order of the properties in the GUI to be different from the order of the properties in the generated class definition in order to give the developer more control over their code.

    I have submitted a feature request on your behalf to our development team requesting the Order value of a property control the location in the class definition but I cannot guarantee that this will or will not make it into a future release.

    Please let me know if I may be of further assistance.
    Last edited by NinjaTrader_MichaelM; 08-04-2015, 07:10 AM.
    Michael M.NinjaTrader Quality Assurance

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ralett, Today, 11:52 AM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_PatrickG  
    Started by rtwave, Yesterday, 07:06 PM
    1 response
    22 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Started by DTSSTS, Today, 11:27 AM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by siroya, Today, 10:02 AM
    2 responses
    9 views
    0 likes
    Last Post DTSSTS
    by DTSSTS
     
    Started by pjsmith, Today, 10:50 AM
    0 responses
    10 views
    0 likes
    Last Post pjsmith
    by pjsmith
     
    Working...
    X