Hello i need help,
I have start the code of my ea, but i have one error "int start" already use. I see who i have 2 line int start, but by which I must replace the 2nd (i am novice)
can one user send to me the correct syntaxe ? thank you
int ccc = 123;
int start ()
{
if (AccountNumber ()! = ccc) return (0);
...........................
}
//=============================================================================================================
int start()
{
string batas="2020.05.01 00:00";
int tt=StrToTime(batas);
if(TimeCurrent()>tt)
{
Alert(" Licence Ended ");
return(0);
}
First of all, when you post code use Alt+S function! Secondly it's all wrong coded. To make that kind of licence you are trying to make you need to do as followed;
Code not tested and i assumed you wanted it for MQL4 and not MQL5
int AccountNo1=12345;//Account number to use datetime ExpiryDate=D'01.05.2020';//When to expire.... //--- int OnInit() { if(!IsTesting() { if(TimeCurrent()>=ExpiryDate) { Alert(" Licence Ended "); ExpertRemove(); return(INIT_FAILED); } } if(AccountNumber()!=AccountNo1) { Print("Account number don't match"); ExpertRemove(); return(INIT_FAILED); } return(INIT_SUCCEEDED); } //--- void OnDeinit(const int reason) { } //--- void OnTick() { //your ea logics here....... return; }
I tried to act on your advice, but nothing worked.
Saying nothing worked is kind of vague...show your code and your attempt to implement it maybe instead of saying it don't work! The code i gave you work fine so i think you have implemented it all wrong

- www.mql5.com
Great job with the template Kenneth.
Thanks
Great job with the template Kenneth.
Thanks
Thank you!

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello i need help,
I have start the code of my ea, but i have one error "int start" already use. I see who i have 2 line int start, but by which I must replace the 2nd (i am novice)
can one user send to me the correct syntaxe ? thank you
int ccc = 123;
int start ()
{
if (AccountNumber ()! = ccc) return (0);
...........................
}
//=============================================================================================================
int start()
{
string batas="2020.05.01 00:00";
int tt=StrToTime(batas);
if(TimeCurrent()>tt)
{
Alert(" Licence Ended ");
return(0);
}