Protection indicator

 
Hello
I am looking to protect an indicator for a trial version.
For example that it can be used for 7 days and then no longer possible to launch it on a chart.

Does anyone have an idea please?
 

For example, what about the following method using "GlobalVariable"?

   string       GV_name        = "Protect";
   string       indicator_name = "Indicator.ex5";
   int          days_available = 7;
   datetime     last_time;

   if (GlobalVariableCheck(GV_name))
   {
      last_time = (datetime)GlobalVariableGet(GV_name);

      if (last_time + days_available * 86400 < TimeCurrent())
      {
         ChartIndicatorDelete(0, 0, indicator_name);
      }
   }
   else
   {
      GlobalVariableSet(GV_name, (double)TimeCurrent());
   }

"GlobalVariable" disappears after a month or so since the last access.

However, this should be enough to keep it expired for a while.
 
Nagisa Unada:

For example, what about the following method using "GlobalVariable"?

"GlobalVariable" disappears after a month or so since the last access.

However, this should be enough to keep it expired for a while.

Any user can delete the global variable. Try pressing F3 in the terminal.

 
Enrique Dangeroux:

Any user can delete the global variable. Try pressing F3 in the terminal.

I didn't know that.

But the seller doesn't have to inform the user about it.

If the user doesn't know about it, it's valid. Don't you think so?

It's probably useless now that you've took about it.

 

Thank you but it will not serve me

Reason: