1 (edited by reza_akrami_azar 2022-11-16 07:49:08)

Topic: Locking on an expert

How to put a lock on a generated expert and limit it for its user?

Does anyone have experience in this matter?

Re: Locking on an expert

Make an "input" field asking for a password or activation token.
Then hard-code the correct one in the expert and check if they match.
Send only the compiled ex4 file to your user.

Re: Locking on an expert

extern string Please_Enter_Password = "";  // User must Type a password (Watermelon)
void OnTick()
  {
   if(__symbol!=_Symbol || __period!=_Period)
     {
      if(__period>0)
        {
         actionTrade.OnDeinit(-1);
         actionTrade.OnInit();
        }
      __symbol = _Symbol;
      __period = _Period;
     }
//+------------------------------------------------------------------+
   {
      if (Please_Enter_Password != "Watermelon") //"Watermelon is a password
      {
         Alert ("Wrong password"); //Send allert if password is wrong
         ExpertRemove();
      }
   }
//+------------------------------------------------------------------+
   actionTrade.OnTick();
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   actionTrade.OnDeinit(reason);

   if(CheckPointer(actionTrade)==POINTER_DYNAMIC)
      delete actionTrade;
  }
reza_akrami_azar wrote:

How to put a lock on a generated expert and limit it for its user?

Does anyone have experience in this matter?