• Welcome back! Thank you for being a part of this Traders Community. Let's discuss and share :)
    Selamat datang kembali! Trimakasih telah menjadi bagian dari Komunitas Trader ini. Mari berdiskusi dan berbagi :)

Answered HELP How to put expiration date on my EA?

i have a good EA. Iwant to protect it by having expiration anybody can help me?

//Below Parameters, put this code

int gi_144 = xxxxx; // Your Account number here
string gs_148 = "2017.10.10 23:59"; //Expire Date here
bool gi_156 = TRUE;
bool gi_160 = TRUE;
extern string Password = "xxxxxxxxxxx"; // Your Password (in the input parameters)

//Below int start, put this code

int start() {
int l_str2time_0;
bool l_bool_4;
int l_acc_number_8;
if (gi_156) {
l_str2time_0 = StrToTime(gs_148);
if (TimeCurrent() >= l_str2time_0) {
Alert("This EA has been expired! Please, Contact to__your [email protected]");
return (0);
}
}
if (gi_160) {
l_bool_4 = (!IsDemo() && !IsTesting());
if (!l_bool_4) {
l_acc_number_8 = AccountNumber();
if (l_acc_number_8 != gi_144) {
Alert("Only Account Number " + gi_144 + " can use this EA ! Please, Contact to__your [email protected]");
return (0);
}
}
}

if (Password != "Your Password") // Write your password here
{
Alert ("Wrong Password!");
return (0);
}
 
//Below Parameters, put this code

int gi_144 = xxxxx; // Your Account number here
string gs_148 = "2017.10.10 23:59"; //Expire Date here
bool gi_156 = TRUE;
bool gi_160 = TRUE;
extern string Password = "xxxxxxxxxxx"; // Your Password (in the input parameters)

//Below int start, put this code

int start() {
int l_str2time_0;
bool l_bool_4;
int l_acc_number_8;
if (gi_156) {
l_str2time_0 = StrToTime(gs_148);
if (TimeCurrent() >= l_str2time_0) {
Alert("This EA has been expired! Please, Contact to__your [email protected]");
return (0);
}
}
if (gi_160) {
l_bool_4 = (!IsDemo() && !IsTesting());
if (!l_bool_4) {
l_acc_number_8 = AccountNumber();
if (l_acc_number_8 != gi_144) {
Alert("Only Account Number " + gi_144 + " can use this EA ! Please, Contact to__your [email protected]");
return (0);
}
}
}

if (Password != "Your Password") // Write your password here
{
Alert ("Wrong Password!");
return (0);
}
where should i put this?
 
where should i put this?
For example,
//+------------------------------------------------------------------+
//| EA Findexs 04.mq4 |
//| Copyright © 2016, [email protected] |
//| https://www.xxxxxx.com |
//+------------------------------------------------------------------+

[HASHTAG]#property[/HASHTAG] copyright "Copyright © 2016, [email protected]"
[HASHTAG]#property[/HASHTAG] link "https://www.xxxxxx.com"
[HASHTAG]#property[/HASHTAG] version "1.00"

Put that's parameter codes in this side

int start() {

And put other codes in this side
 
For example,
//+------------------------------------------------------------------+
//| EA Findexs 04.mq4 |
//| Copyright © 2016, [email protected] |
//| https://www.xxxxxx.com |
//+------------------------------------------------------------------+

[HASHTAG]#property[/HASHTAG] copyright "Copyright © 2016, [email protected]"
[HASHTAG]#property[/HASHTAG] link "https://www.xxxxxx.com"
[HASHTAG]#property[/HASHTAG] version "1.00"

Put that's parameter codes in this side

int start() {

And put other codes in this side
thank you bro
 
I have a beta EA that I'm loving but they're not rolling it out... it's going to stop working on June 1st. I'm assuming somewhere in it is an expiration date... any idea how I'd remove that?
 
Back
Top