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

Making parameters available to strategy scripts

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

    Making parameters available to strategy scripts

    Hello,

    I've got an indicator with several parameters that I need to be able to set when I use it within a strategy. I had all of this working and was fiddling with how I would hide those parameters as I've seen in some 3rd party indicators I have a license to.

    I was able to get my indicator's parameters inaccessible to my strategy by adding the tag [Gui.Design.DisplayName("Param Name")].

    However when I went to make the parameters accessible I couldn't seem to reverse the process. Simply commenting the new tag did nothing.

    I'm noticing that the Ninjascript generated code is always the same and missing the parameters I wish to expose.

    How do I get my parameters back? I've even tried starting with a differently named empty stratgey and putting my code in it and still the parameters are not accessible.

    Thanks
    daqu40
    NinjaTrader Ecosystem Vendor - QTradez

    #2
    Hello daqu40,

    Thank you for writing in.

    Utilizing the [Gui.Design.DisplayName()] attribute should not be causing the particular property with that attribute from being inaccessible to a strategy. All this will do is change the name that appears within the Indicators window for said property.

    Can you ensure that you have the [GridCategory("")] attribute for that property? Without this attribute, the particular property will be removed from the indicator method call's parameters.
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      That fixed it. I had [Category("this category")] and that seems to be why it wasn't working.

      Thanks!
      daqu40
      NinjaTrader Ecosystem Vendor - QTradez

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by carnitron, Today, 08:42 PM
      0 responses
      5 views
      0 likes
      Last Post carnitron  
      Started by strategist007, Today, 07:51 PM
      0 responses
      7 views
      0 likes
      Last Post strategist007  
      Started by StockTrader88, 03-06-2021, 08:58 AM
      44 responses
      3,974 views
      3 likes
      Last Post jhudas88  
      Started by rbeckmann05, Today, 06:48 PM
      0 responses
      8 views
      0 likes
      Last Post rbeckmann05  
      Started by rhyminkevin, Today, 04:58 PM
      4 responses
      58 views
      0 likes
      Last Post dp8282
      by dp8282
       
      Working...
      X