Results 1 to 4 of 4
 0 Attachment(s)    

Thread: Error in checktime()?

  1. #1
    Junior Member
    Join Date
    Nov 2009
    Posts
    8

    Default Error in checktime()?

    I was looking at some of the EAs that use the checktime() function and I think there's an error.

    nendhour=endhour+(gmtshift);if(nendhour>23)nendhou r=nendhour-24;
    if(endhour<10)iendhour="0"+nendhour;
    if(endhour>9)iendhour=nendhour;
    if(endminute<10)iendminute="0"+endminute;
    if(endminute>9)iendminute=endminute;
    tend=StrToTime(svrdate+" "+iendhour+":"+iendminute);

    I believe it should be:
    if(nendhour<10)iendhour="0"+nendhour;
    if(nendhour>9)iendhour=nendhour;

    Correct me if I'm completely wrong though.
    Last edited by Clearpaper; 08-19-2010 at 06:52.

  2. #2
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by Clearpaper View Post
    I was looking at some of the EAs that use the checktime() function and I think there's an error.

    nendhour=endhour+(gmtshift);if(nendhour>23)nendhou r=nendhour-24;
    if(endhour<10)iendhour="0"+nendhour;
    if(endhour>9)iendhour=nendhour;
    if(endminute<10)iendminute="0"+endminute;
    if(endminute>9)iendminute=endminute;
    tend=StrToTime(svrdate+" "+iendhour+":"+iendminute);

    I believe it should be:
    if(nendhour<10)iendhour="0"+nendhour;
    if(nendhour>9)iendhour=nendhour;

    Correct me if I'm completely wrong though.
    Hi Clearpaper,

    That's correct, it has been corrected few months ago.

  3. #3
    Junior Member
    Join Date
    Nov 2009
    Posts
    8

    Default

    Hi Funyoo,

    Thanks for clearing that up. I'm of the impression that you've written an EA builder. Is this available to the Elite Section subscribers?

  4. #4
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by Clearpaper View Post
    Hi Funyoo,

    Thanks for clearing that up. I'm of the impression that you've written an EA builder. Is this available to the Elite Section subscribers?
    Hi Clearpaper,

    It is a template that I use when I only need to rewrite the entry logics. Yes it is available in the Elite section.

Similar Threads

  1. Ex4 write error
    By fxtester in forum MQL programming
    Replies: 0
    Last Post: 12-04-2015, 19:47
  2. OrderClose error 138
    By fxtester in forum MQL programming
    Replies: 0
    Last Post: 02-11-2015, 21:39
  3. OrderSend error 134
    By fxtester in forum MQL programming
    Replies: 0
    Last Post: 02-11-2015, 21:39
  4. Error code 129
    By italiangoose in forum Scripts and other tools
    Replies: 1
    Last Post: 02-10-2010, 12:08
  5. Where is error ?
    By przem81621 in forum MQL programming
    Replies: 2
    Last Post: 07-09-2009, 07:34

Tags for this Thread

color, dmi, eas, elite

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •