Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Hide or disable an indicator property

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

    Hide or disable an indicator property

    Hello,

    Would it be possible to hide or disable a property of an indicator?

    For example, I would want to hide or disable the Avg Color of a MACD indicator, because I don't want the user to modify it.

    Thanks in advance.

    #2
    Hello IkerCB,

    Thank you for your post.

    The only option available is to set the Avg line color to Transparent as seen in the attached screen shot.

    Please let me know if I may be of further assistance.
    Attached Files
    Christopher J.NinjaTrader Customer Service

    Comment


      #3
      Hello Christopher, thanks for answering.

      I don't want to hide the line in the chart, I want it to be visible, but I would want to prevent the user from changing the color in the properties of the indicator.

      Comment


        #4
        IkerCB,

        What you could do is if they change it, programmatically change it back.

        For example, if they changed the color to black you can change it back to blue like this:
        Code:
        Plots[0].Pen = new Pen(Color.Blue);
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Thanks Josh, I think I will use that option. Thanks!

          Anyway, would be any way to hide properties of an indicator? It would be very useful.

          Comment


            #6
            IkerCB,

            If you don't want properties displayed, you should make these variables private only, and remove the public declaration in the properties region.

            You can also set PlotsConfigurable = false; to disable plot controls for the indicator.

            Ryan M.NinjaTrader Customer Service

            Comment


              #7
              Thanks Ryan, really helpful information.

              The properties that I would want to hide are some of the default properties of the MACD indicator, like the color of the Avg and MACD lines. Is it possible to remove the public declaration of a default property's variable?

              PlotsConfigurable = false; I found this info very helpful, but I don't want to hide all the plot controls. Thanks anyway.

              Comment


                #8
                Plot colors are only hidden with PlotsConfigurable property. Unfortunately it's an all or nothing setting.
                Ryan M.NinjaTrader Customer Service

                Comment


                  #9
                  Ok, thank you very much Ryan.

                  Comment


                    #10
                    Originally posted by IkerCB View Post
                    Hello,

                    Would it be possible to hide or disable a property of an indicator?

                    For example, I would want to hide or disable the Avg Color of a MACD indicator, because I don't want the user to modify it.
                    Hello,

                    just do not implement setter / getter methods for the avg private variable.

                    I think, I have more extended question for more experienced guys,

                    for example,
                    1) I have a boolean property, let say 'flag'
                    2) I would like to implement switcher:
                    * if flag == true (user sets it to true on 'Indicators' dialog) then show property1 , property2 ...
                    * if flag == false then hide property1, property2..

                    I would be really appreciate any help

                    Comment


                      #11
                      Originally posted by akushyn View Post
                      Hello,

                      just do not implement setter / getter methods for the avg private variable.

                      I think, I have more extended question for more experienced guys,

                      for example,
                      1) I have a boolean property, let say 'flag'
                      2) I would like to implement switcher:
                      * if flag == true (user sets it to true on 'Indicators' dialog) then show property1 , property2 ...
                      * if flag == false then hide property1, property2..

                      I would be really appreciate any help
                      I'm very interested in the answer to akushyn's question. Is there a way to dynamically manipulate the selection of properties that appears in the properties window for indicators and strategies? His example is a perfect illustration of what I am looking for.

                      You can see an example of this in the Strategy properties window (Edit Strategy window) under "Order Properties." When you change "Set order quantity" to "by default quantity" it adds a property above it called "Default Quantity".

                      Is there any way to enable this capability with our own properties?

                      Scott
                      sh_daggett
                      NinjaTrader Ecosystem Vendor - NinjaLaunchpad

                      Comment


                        #12
                        Originally posted by sh_daggett View Post
                        I'm very interested in the answer to akushyn's question. Is there a way to dynamically manipulate the selection of properties that appears in the properties window for indicators and strategies? His example is a perfect illustration of what I am looking for.

                        You can see an example of this in the Strategy properties window (Edit Strategy window) under "Order Properties." When you change "Set order quantity" to "by default quantity" it adds a property above it called "Default Quantity".

                        Is there any way to enable this capability with our own properties?

                        Scott
                        You will need to manipulate the Browsable attribute of the property.

                        Comment


                          #13
                          Originally posted by koganam View Post
                          You will need to manipulate the Browsable attribute of the property.
                          Thanks, koganam. That helps. However, is there an event that gets triggered that I can write code to manipulate the Browsable attribute when the property window is being edited by the user? It seems that such an event handler is needed to dynamically make the change.

                          Thanks.

                          Scott
                          sh_daggett
                          NinjaTrader Ecosystem Vendor - NinjaLaunchpad

                          Comment


                            #14
                            Here is your answer:
                            wh hi, I didn't understand what your code is supposed to do but I don't think that it answers my request. What I want is like in zigzag indicator when you change the "use high and low" from true to false new property "price type" appears. Or like in "set order quantity" by changing from "by strategy" to "by default quantity". Thanks, Baruch try this public enum MMType { Fix_Percent, Kelly_F } in Vars private MMType mmtype; in Properties [Description("Money …


                            Baruch

                            Comment


                              #15
                              Originally posted by Baruch View Post
                              Here is your answer:
                              wh hi, I didn't understand what your code is supposed to do but I don't think that it answers my request. What I want is like in zigzag indicator when you change the "use high and low" from true to false new property "price type" appears. Or like in "set order quantity" by changing from "by strategy" to "by default quantity". Thanks, Baruch try this public enum MMType { Fix_Percent, Kelly_F } in Vars private MMType mmtype; in Properties [Description("Money …


                              Baruch
                              First of all, Baruch, bless your ever-lovin' heart for that answer, and thanks to jeremytang for providing the sample code!

                              Secondly, please see "First of all".
                              sh_daggett
                              NinjaTrader Ecosystem Vendor - NinjaLaunchpad

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by timmbbo, Today, 08:59 AM
                              1 response
                              2 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by KennyK, 05-29-2017, 02:02 AM
                              2 responses
                              1,281 views
                              0 likes
                              Last Post marcus2300  
                              Started by fernandobr, Today, 09:11 AM
                              0 responses
                              3 views
                              0 likes
                              Last Post fernandobr  
                              Started by itrader46, Today, 09:04 AM
                              1 response
                              6 views
                              0 likes
                              Last Post NinjaTrader_Clayton  
                              Started by bmartz, 03-12-2024, 06:12 AM
                              5 responses
                              33 views
                              0 likes
                              Last Post NinjaTrader_Zachary  
                              Working...
                              X