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 TraderG23, 12-08-2023, 07:56 AM
    9 responses
    382 views
    0 likes
    Last Post Gavini
    by Gavini
     
    Started by oviejo, Today, 12:28 AM
    0 responses
    1 view
    0 likes
    Last Post oviejo
    by oviejo
     
    Started by pechtri, 06-22-2023, 02:31 AM
    10 responses
    125 views
    0 likes
    Last Post Leeroy_Jenkins  
    Started by judysamnt7, 03-13-2023, 09:11 AM
    4 responses
    59 views
    0 likes
    Last Post DynamicTest  
    Started by ScottWalsh, Yesterday, 06:52 PM
    4 responses
    36 views
    0 likes
    Last Post ScottWalsh  
    Working...
    X