How to lock the indicaotr with password

Cromo
393
Cromo  

I have just protect the indicator with password key.

extern string Password = "The password";

void OnTick()
{
    if( Password != "The password" )
    {
        Comment("The password is wrong.");
        return;
    }
 
  ///Main code/////  


}

But if I use this code, I can not read indicator buffer signal. It is always empty value.

Can you tell me why this happened?

William Roeder
24704
William Roeder  
Cromo: Can you tell me why this happened?
Use the debugger or print out your variables, and find out why. Do you really expect us to debug your code for you?