View Single Post
  #8 (permalink)  
Old 05-17-2006, 02:20 PM
newdigital newdigital is online now
Administrator
 
Join Date: Sep 2005
Posts: 16,816
Blog Entries: 145
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
Quote:
Originally Posted by newdigital
If we are talking about ex4 file so you may insert in original mql4 code any account number, for example (in the beginning of the code just below the settings):

Code:
int Account = 111111;
And below
Code:
int start
may be the following:

Code:
if (Account != AccountNumber()){
      Comment("Trade on account :"+AccountNumber()+" FORBIDDEN!");
      return(0);
   }else {Comment("");}

As to trial version so you may do the following (below int start):

Code:
if (CurTime()>1113609600) { //16.04.2005
      Alert("My EA was expired! Please re-new your licence");
      return;
   }
What is this number: 1113609600?
It is the time in seconds since 00:00 1st of January 1970. It is hard to count the seconds. And if you do not want to count it you may do the following:

1. Create MT3 EA:

Code:
/*[[
Name := babarmughal
Author := Copyright © 2005, MetaQuotes Software Corp.
Link := http://www.metaquotes.net/
Lots := 1.00
Stop Loss := 0
Take Profit := 0
Trailing Stop := 0
]]*/
Var: ExpirationDate(0);
comment(StrToTime("2006.08.16 00:00"));
2. Compile it in MT3.
3. Attach EA to the chart (MT3) and you will see on the chart the number of seconds since 00:00 1st of Janusry 1970 till 2006.08.16 00:00.
Reply With Quote