//+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { if(PASSWORD!="ABC") { Print("BAD PASSWORD"); return(-1); } ... //--- SUCCESS return(0); }
mql5 thanks for you reply, but your method still does not mask out the inputs characters. ABC still display (anyone could read the pw if shown)... should be *** when user type in ABC.
mql5:

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I want to password protected my indicator, below is what I can come up with but there is a flaw. I don't want the real characters to show when user type password in the inputs box instead replace the typed character with asterisks * could someone help me fix it? thanks.
input string password = "0";
void OnInit()
{
if (password != "abcd") //<-- Assigned password.
{
Alert ("Wrong password!");
return;
}