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 royhagerman, Today, 04:30 AM
      0 responses
      1 view
      0 likes
      Last Post royhagerman  
      Started by haas88, 03-21-2024, 02:22 AM
      18 responses
      208 views
      0 likes
      Last Post haas88
      by haas88
       
      Started by Board game geek, Today, 02:20 AM
      0 responses
      6 views
      0 likes
      Last Post Board game geek  
      Started by knighty6508, Today, 01:20 AM
      2 responses
      15 views
      0 likes
      Last Post knighty6508  
      Started by franatas, Today, 01:53 AM
      0 responses
      5 views
      0 likes
      Last Post franatas  
      Working...
      X