Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Generated method signatures different in NT 7 and NT 8

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

    Generated method signatures different in NT 7 and NT 8

    I'm upgrading my indicators from NT 7 to NT 8.

    Some of these indicators are very complex, and I had a series of parameters that I defined in the Properties region as [Category("Parameters")], and another set of less important parameters that I defined as [Category("Extra Parameters")].

    NT 7 would generate a method signature with just my "Parameters" (NinjaScript generated code. Neither change nor remove). So it was very easy to call this indicator from a strategy with just 3 parameters instead of 20 for example.

    In NT 8 I'm following the same procedure...
    [NinjaScriptProperty]
    Display(Name="01. Span", Description="Bar span for Indicator X to consider for highest and lowest values", Order=2, GroupName="Parameters")]
    ....
    [NinjaScriptProperty]
    Display(Name="01. Line color", Description="Line Color", Order=2, GroupName="Extra Parameters")]

    but it seems that the method signature is generated by NT 8 with all the 20 indicators. It doesn't differentiate between "Parameters" and "Extra Parameters".

    This means that when I call it from a strategy I would have to use all the 20 parameters. Is this normal behavior? is there a way to make NT 8 behave like NT 7?

    Thanks!

    #2
    Hello ds1111,

    Thanks for your post.

    [NinjaScriptProperty] - Definition: Determines if the following declared property should be included in the NinjaScript object's constructor as a parameter. This is useful if you plan on calling a NinjaScript object from another (e.g., calling a custom indicator from a strategy) or customizing the display parameter data on a grid or from a chart.

    Just remove [NinjaScriptProperty] as needed.

    Helpguide reference: http://ninjatrader.com/support/helpG...yattribute.htm

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    30 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    17 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    9 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    16 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    19 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X