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 futtrader, 04-21-2024, 01:50 AM
      5 responses
      56 views
      0 likes
      Last Post NinjaTrader_Eduardo  
      Started by PeakTry, Today, 10:49 AM
      0 responses
      2 views
      0 likes
      Last Post PeakTry
      by PeakTry
       
      Started by llanqui, Today, 10:32 AM
      0 responses
      5 views
      0 likes
      Last Post llanqui
      by llanqui
       
      Started by StockTrader88, 03-06-2021, 08:58 AM
      45 responses
      3,992 views
      3 likes
      Last Post johntraderuser2  
      Started by TAJTrades, Today, 09:46 AM
      0 responses
      8 views
      0 likes
      Last Post TAJTrades  
      Working...
      X