• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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 yeshujbp, Today, 08:10 PM
      0 responses
      1 view
      0 likes
      Last Post yeshujbp  
      Started by backtester831, Today, 06:54 PM
      0 responses
      1 view
      0 likes
      Last Post backtester831  
      Started by frayrengytrader, Today, 06:03 PM
      0 responses
      3 views
      0 likes
      Last Post frayrengytrader  
      Started by JustAFish, Today, 05:29 PM
      0 responses
      5 views
      0 likes
      Last Post JustAFish  
      Started by TraderCAD, Today, 04:27 PM
      1 response
      8 views
      0 likes
      Last Post TraderCAD  
      Working...
      X