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?
Create and Test Forex Strategies
You are not logged in. Please login or register.
Forex Software → Forex Strategy Builder Professional → 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?
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.
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;
}
How to put a lock on a generated expert and limit it for its user?
Does anyone have experience in this matter?
Forex Software → Forex Strategy Builder Professional → Locking on an expert
Powered by PunBB, supported by Informer Technologies, Inc.