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
//+------------------------------------------------------------------+
// -- EA protection
//+------------------------------------------------------------------+
//
//string expire_date; ="2018.10.20"; //<-- hard coded datetime year-month-day
//
//static int AllowedAccountNo; =156249;
//+------------------------------------------------------------------+
// -- Functions
//+------------------------------------------------------------------+
int start() {
// funzione controllo data
datetime e_d=StrToTime(expire_date);
if(TimeCurrent()>=e_d)
{
Alert("The MPA Portfolio EA has been expired");
Comment("The MPA Portfolio EA has been expired");
return(0);
}
//---- Account validation check ----
int numconto = AccountNumber();
if (numconto == 0)
{
Print("Waiting account number...");
return(0);
}
datetime nopermitalert=0;
if (numconto != AllowedAccountNo && nopermitalert != Time[0])
{
Alert("You are not allowed to use This MPA Portfolio Expert Advisor!");
nopermitalert = Time[0];
return(-1);
}
then continues the EA code