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:
     [[COLOR=#080808]Range[/COLOR]([COLOR=#ff8c00]1[/COLOR], [COLOR=#0000ff]int[/COLOR].[COLOR=#080808]MaxValue[/COLOR]), [COLOR=#080808]NinjaScriptProperty[/COLOR]]
     [[COLOR=#080808]Display[/COLOR]([COLOR=#080808]ResourceType[/COLOR] = [COLOR=#0000ff]typeof[/COLOR]([COLOR=#080808]Custom[/COLOR].[COLOR=#080808]Resource[/COLOR]), [COLOR=#080808]Name[/COLOR] = [COLOR=#b22222]"Item 1"[/COLOR], [COLOR=#080808]Description[/COLOR] = [COLOR=#800000]@" Item 1Stop Ticks"[/COLOR], [COLOR=#080808]Order[/COLOR] = [COLOR=#ff8c00]0[/COLOR], [COLOR=#080808]GroupName[/COLOR] = [COLOR=#b22222]"NinjaScriptParameters"[/COLOR])]
     [COLOR=#0000ff]public[/COLOR] [COLOR=#0000ff]int[/COLOR] Item1[COLOR=#080808]ST
    [/COLOR] {
     [COLOR=#0000ff]get[/COLOR] { [COLOR=#0000ff]return[/COLOR] Item1[COLOR=#080808]StopTicks[/COLOR]; }
     [COLOR=#0000ff]set[/COLOR] { Item1[COLOR=#080808]StopTicks[/COLOR] = [COLOR=#080808]Math[/COLOR].[COLOR=#080808]Max[/COLOR]([COLOR=#ff8c00]1[/COLOR], [COLOR=#080808]value[/COLOR]); }
     }
      
     [[COLOR=#080808]Range[/COLOR]([COLOR=#ff8c00]1[/COLOR], [COLOR=#0000ff]int[/COLOR].[COLOR=#080808]MaxValue[/COLOR]), [COLOR=#080808]NinjaScriptProperty[/COLOR]]
     [[COLOR=#080808]Display[/COLOR]([COLOR=#080808]ResourceType[/COLOR] = [COLOR=#0000ff]typeof[/COLOR]([COLOR=#080808]Custom[/COLOR].[COLOR=#080808]Resource[/COLOR]), [COLOR=#080808]Name[/COLOR] = [COLOR=#b22222]"Item2"[/COLOR], [COLOR=#080808]Description[/COLOR] = [COLOR=#800000]@" Item2Target Ticks"[/COLOR], [COLOR=#080808]Order[/COLOR] = [COLOR=#ff8c00]1[/COLOR], [COLOR=#080808]GroupName[/COLOR] = [COLOR=#b22222]"NinjaScriptParameters"[/COLOR])]
     [COLOR=#0000ff]public[/COLOR] [COLOR=#0000ff]int[/COLOR] [COLOR=#800000]Item2[/COLOR][COLOR=#080808]TT
    [/COLOR] {
     [COLOR=#0000ff]get[/COLOR] { [COLOR=#0000ff]return[/COLOR] [COLOR=#800000]Item2[/COLOR][COLOR=#080808]TargetTicks[/COLOR]; }
     [COLOR=#0000ff]set[/COLOR] { [COLOR=#800000]Item2[/COLOR][COLOR=#080808]TargetTicks[/COLOR] = [COLOR=#080808]Math[/COLOR].[COLOR=#080808]Max[/COLOR]([COLOR=#ff8c00]1[/COLOR], [COLOR=#080808]value[/COLOR]); }
     }
    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:
     [[COLOR=#080808]Range[/COLOR]([COLOR=#ff8c00]1[/COLOR], [COLOR=#0000ff]int[/COLOR].[COLOR=#080808]MaxValue[/COLOR]), [COLOR=#080808]NinjaScriptProperty[/COLOR]]
     [[COLOR=#080808]Display[/COLOR]([COLOR=#080808]ResourceType[/COLOR] = [COLOR=#0000ff]typeof[/COLOR]([COLOR=#080808]Custom[/COLOR].[COLOR=#080808]Resource[/COLOR]), [COLOR=#080808]Name[/COLOR] = [COLOR=#b22222]"Item2"[/COLOR], [COLOR=#080808]Description[/COLOR] = [COLOR=#800000]@" Item2Target Ticks"[/COLOR], [COLOR=#080808]Order[/COLOR] = [COLOR=#ff8c00]1[/COLOR], [COLOR=#080808]GroupName[/COLOR] = [COLOR=#b22222]"NinjaScriptParameters"[/COLOR])]
     [COLOR=#0000ff]public[/COLOR] [COLOR=#0000ff]int[/COLOR] [COLOR=#800000]Item2[/COLOR][COLOR=#080808]TT
    [/COLOR] {
     [COLOR=#0000ff]get[/COLOR] { [COLOR=#0000ff]return[/COLOR] [COLOR=#800000]Item2[/COLOR][COLOR=#080808]TargetTicks[/COLOR]; }
     [COLOR=#0000ff]set[/COLOR] { [COLOR=#800000]Item2[/COLOR][COLOR=#080808]TargetTicks[/COLOR] = [COLOR=#080808]Math[/COLOR].[COLOR=#080808]Max[/COLOR]([COLOR=#ff8c00]1[/COLOR], [COLOR=#080808]value[/COLOR]); }
     }
      
     [[COLOR=#080808]Range[/COLOR]([COLOR=#ff8c00]1[/COLOR], [COLOR=#0000ff]int[/COLOR].[COLOR=#080808]MaxValue[/COLOR]), [COLOR=#080808]NinjaScriptProperty[/COLOR]]
     [[COLOR=#080808]Display[/COLOR]([COLOR=#080808]ResourceType[/COLOR] = [COLOR=#0000ff]typeof[/COLOR]([COLOR=#080808]Custom[/COLOR].[COLOR=#080808]Resource[/COLOR]), [COLOR=#080808]Name[/COLOR] = [COLOR=#b22222]"Item 1"[/COLOR], [COLOR=#080808]Description[/COLOR] = [COLOR=#800000]@" Item 1Stop Ticks"[/COLOR], [COLOR=#080808]Order[/COLOR] = [COLOR=#ff8c00]0[/COLOR], [COLOR=#080808]GroupName[/COLOR] = [COLOR=#b22222]"NinjaScriptParameters"[/COLOR])]
     [COLOR=#0000ff]public[/COLOR] [COLOR=#0000ff]int[/COLOR] Item1[COLOR=#080808]ST
    [/COLOR] {
     [COLOR=#0000ff]get[/COLOR] { [COLOR=#0000ff]return[/COLOR] Item1[COLOR=#080808]StopTicks[/COLOR]; }
     [COLOR=#0000ff]set[/COLOR] { Item1[COLOR=#080808]StopTicks[/COLOR] = [COLOR=#080808]Math[/COLOR].[COLOR=#080808]Max[/COLOR]([COLOR=#ff8c00]1[/COLOR], [COLOR=#080808]value[/COLOR]); }
     }
    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, 08:10 AM.
    Michael M.NinjaTrader Quality Assurance

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    662 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    376 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    110 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    575 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    580 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X