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

Remove some parameters from public indicator constructor

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

    Remove some parameters from public indicator constructor

    Hello:

    I'm one indicator with some custom parameters.

    Some of the parameters are only for visual appearance (ShowBackGroundColor, by example) and I will not want to appear in the call to indicator from other indicators, but I want to appear in the indicator properties window.

    I searched the forum and have not found the solution.

    Can anyone help me?

    Thank you in advance.

    Code:
    	[Description("Show Back Ground Color from trend")]
            [GridCategory("Visual")]
            public bool ShowBackGroundColor
            {
                get { return showBackGroundColor; }
                set { showBackGroundColor = value; }
            }
    
    	[Description("Bars Filter to reverse trend")]
            [GridCategory("Parameters")]
            public int FilterBars
            {
                get { return filterBars; }
                set { filterBars = Math.Max(0, value); }
            }
    I want ShowBackGroundColor not show into constructor class method

    #2
    I continued looking at the forum and then I tried one thing, I replaced GridCategory by Category in those parameters that wanted to hide. And now it's working!

    My question now is, in this thread: http://www.ninjatrader.com/support/f...ad.php?t=27751 there is talk that we use for the indicator parameters GridCategory and Category for those who only want to display in the properties window.

    But this thread:http://www.ninjatrader.com/support/f...ad.php?t=24144 is said to always use GridCategory

    What is really the use of GridCategory and Category ?

    Another question, if I add my parameters to the category 'Visual',two "Visual" groups appear in the window. This is normal or is it a bug?

    All it's about NT v7.
    Attached Files

    Comment


      #3
      Hi Jatubo,

      this is all a bit try-yourself and debug stuff...

      But the category name might be "\r\r\r\rVisual" , which is different from the "Visual" you used.


      regards
      andreas

      Comment


        #4
        jatubio, please see a post from Dierk brlow on the use of Category vs GridCategory in NT 7 - http://www.ninjatrader.com/support/f...76&postcount=7
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Originally posted by zweistein View Post
          Hi Jatubo,

          this is all a bit try-yourself and debug stuff...

          But the category name might be "\r\r\r\rVisual" , which is different from the "Visual" you used.


          regards
          andreas
          Thank you andreas, was just curious. But, as I have just seen, the answer is also curious

          Originally posted by NinjaTrader_Bertrand View Post
          jatubio, please see a post from Dierk brlow on the use of Category vs GridCategory in NT 7 - http://www.ninjatrader.com/support/f...76&postcount=7
          Thank you Bertrand.

          I think it would be interesting to add this to the NT7 help documentation.

          Best Regards

          Comment


            #6
            Was anyone able to figure out how to add parameters to the "Visual" Category without it simply creating a second "Visual" group within the parameters?

            I've tried using "Category" and "GridCategory", but neither will do what I want. The only different I see is that "GridCategory" puts it at the top of the list, while "Category" puts it at the bottom.

            Thanks!
            Daniel

            Comment


              #7
              Originally posted by neoikon View Post
              Was anyone able to figure out how to add parameters to the "Visual" Category without it simply creating a second "Visual" group within the parameters?
              I'll answer my own question. It seems that this works (note the "\r" in the category name). Without it, no dice.

              Code:
              [Gui.Design.DisplayName("Your Label")]
              [Description("Your description")]
              [Category("\rVisual")]
              ... based on the suggestion from zweistein

              Thanks!
              Daniel

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by fx.practic, 10-15-2013, 12:53 AM
              5 responses
              5,404 views
              0 likes
              Last Post Bidder
              by Bidder
               
              Started by Shai Samuel, 07-02-2022, 02:46 PM
              4 responses
              95 views
              0 likes
              Last Post Bidder
              by Bidder
               
              Started by DJ888, Yesterday, 10:57 PM
              0 responses
              8 views
              0 likes
              Last Post DJ888
              by DJ888
               
              Started by MacDad, 02-25-2024, 11:48 PM
              7 responses
              160 views
              0 likes
              Last Post loganjarosz123  
              Started by Belfortbucks, Yesterday, 09:29 PM
              0 responses
              9 views
              0 likes
              Last Post Belfortbucks  
              Working...
              X