Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

NinjaScript generated code not updated if comments are added

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

    NinjaScript generated code not updated if comments are added

    hi

    I noticed that the NinjaScript generated code is not updated when you add a new parameter to your indicator and put a comment after the definition and before the get/set line.
    The below example will not update the NinjaScript generated code upon saving. The indicator will still run perfectly fine until you reference it from a strategy or another indicator.
    Then you have a mismatch in the # of parameters and it took me quite some time to figure out what was going on.
    You may want to address this in code or mention in the documentation.

    [NinjaScriptProperty]
    [Display(Name = "Period", Order = 10, GroupName = "Parameters")]
    public int Period // some comment put here
    { get; set; }



    #2
    Hello DukuGrinder,

    Thank you for reporting this.

    I was able to reproduce.

    I will submit a feature request to allow for comments after NinjaScriptProperty public object declarations.

    I will also request this be mentioned in the help guide.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      it is not a feature request, it is a bug..

      Comment


        #4
        Hello DukuGrinder,

        NinjaTrader has a NinjaScript wrapper that parses the indicator file before compiling to create the NinjaScript generated code. This wrapper comes with limitations like we see here. We will be making some documentation updates in the future to outline these limitations.

        If there is any other behavior that you are seeing with the NinjaScript Generated code that you would like to report so we can have it documented, we will be happy to review.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by AaronKoRn, Today, 09:49 PM
        0 responses
        11 views
        0 likes
        Last Post AaronKoRn  
        Started by carnitron, Today, 08:42 PM
        0 responses
        10 views
        0 likes
        Last Post carnitron  
        Started by strategist007, Today, 07:51 PM
        0 responses
        11 views
        0 likes
        Last Post strategist007  
        Started by StockTrader88, 03-06-2021, 08:58 AM
        44 responses
        3,980 views
        3 likes
        Last Post jhudas88  
        Started by rbeckmann05, Today, 06:48 PM
        0 responses
        9 views
        0 likes
        Last Post rbeckmann05  
        Working...
        X