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

password setting

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

    password setting

    Hi. In my indicator I have a password field that is a variable. Is there a way to code the parameter setting for this field so that when it is entered, it prints "*" instead of the password text?

    #2
    Hello,

    Thank you for the question.

    This can be accomplished by using the PasswordPropertyText attribute.

    NinjaTrader 7 uses the C# PropertyGrid, so any modifications that need to be made to the property grid specifically can be found easily using google. This was turned up by searching for "c# property grid password text field"


    Here is an example that would compile in NinjaScript:

    Code:
    private string password = "";
    		
    [PasswordPropertyText(true)]
    [Description("Enter a Password")]
    [GridCategory("Parameters")]
    public string MyPassword
    {
          get{return password; }  set {password = value;}
    }
    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by TraderG23, 12-08-2023, 07:56 AM
    10 responses
    397 views
    1 like
    Last Post beobast
    by beobast
     
    Started by lorem, Yesterday, 09:18 AM
    5 responses
    19 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by WHICKED, Today, 12:56 PM
    2 responses
    15 views
    0 likes
    Last Post WHICKED
    by WHICKED
     
    Started by Felix Reichert, Today, 02:12 PM
    0 responses
    2 views
    0 likes
    Last Post Felix Reichert  
    Started by Tim-c, Today, 02:10 PM
    0 responses
    4 views
    0 likes
    Last Post Tim-c
    by Tim-c
     
    Working...
    X