Problems with Time() - page 3

 
SDC:

LOL dont you think if the MQL4 Time based functions have those serious flaws someone else probably would have noticed by now ?

Maybe you might try correcting your flawed code first before claiming the functions are flawed

in your closing criteria try changing:

TimeHour(TimeCurrent()) == 23 && TimeHour(TimeCurrent()) == 59

to:

if(TimeHour(TimeCurrent()) == 23 && TimeMinute(TimeCurrent()) == 59)

Also you might try correcting that too lol

change:

TimeHour(TimeCurrent()) == 00 && TimeHour(TimeCurrent()) <= 05

to:

if(TimeHour(TimeCurrent()) == 0 && TimeMinute(TimeCurrent()) <= 5)


Did you read the OP before attempting to correct it? The OP tells you why this syntax is not appropriate and why it won't work.

 

You proud about yourself - get out of your room there's people smarter than you !

Just to remind you, before you judging something, learn about it first.

CFx 2012.05.31 03:41

LOL!

I'm starting to think that a majority of the "Time" based functions in MT4 are seriously flawed.

 
SDC:

change:

TimeHour(TimeCurrent()) == 00 && TimeHour(TimeCurrent()) <= 05

to:

if(TimeHour(TimeCurrent()) == 0 && TimeMinute(TimeCurrent()) <= 5)


You are NOT thinking from the standpoint of a NON-MQL programmer, are you? If you had read the OP, you would have seen where I already used TimeHour and TimeMinute sequentially. You would also have seen where I intentionally used TimeHour and TimeHour sequentially. Why? To fine out the behavior of MQL. That's one way that non-MQL programmers learn. If what's supposed to be the correct syntax does not work, then a non-programmer will at least try something else, to see if there is a difference in the output and hopefully learn something from that change. If I absolutely knew that TimeHour should precede TimeMinute, without question - then I would never have tried TimeHour and TimeHour sequentially.

Unfortunately, neither have worked in my installation of MT4.

 
CFx:
Traders trade. Programers, program. I am NOT a programmer............ yet.
Since there are no slaves here, there are only two choices: learn to code or pay someone. We're not going to code it FOR you. We are willing to HELP you unless you piss off too many people.
 
onewithzachy:

Dear CFx,

My apology if I rant. I have bad day. I think we have other forumer that may must-have to re-install his PC coz he's not reading my replies throughoutly right.

1. If you want to close trades between Monday and Thursday, all at 23:57, and on Friday 21:57

And you can modify the same code for Open Trade.

Read this about testing https://www.mql5.com/en/articles/1512


2. This is important : you mentioned "tools". If you be so kind to elaborate what you mean by "tools" - it's OK to mention it's name here. We only use MetaEditor. There's plenty forumers here that use some online tools out there and had us fix the errs. You have to tell us what it is, coz your codes may full with errors - e.g. your logic is correct but you use wrong kind of mql4 functions.


3. It seem to me that you like writing a long pages a lot, there's nothing I can do about that, except please keep this in mind :

so you won't get some embarrassment, especially after you said ...

We're always here to help, even including reading your long essays.

Here's your - very long - first post.



Ok, so you offer help, criticize something you don't understand, criticize long posts and then end your post by re-posting the long post that you criticized?

LOL! I just love the online world! :)

Look, the vast majority of MQL programmer that I have met, couldn't write solitary line of Trade Logic that works, even if you handed it to them on a silver platter. I fully understand the "attitude" of programmers. They think that because they know MQL, or some other programming language(s), that somehow that makes them equally as competent in writing Trade Logic. I realize I'm in the hornets nest here, but let me offer a wake-up call to some of you who have criticized my post: Computer Programming Logic, is NOT Trade Logic. Never the twain shall they meet. The two disciplines are completely different.

I'm very good at writing trade logic - logical algorithms for the purpose of executing profitable trades a high percentage of the time AND to a specified target. That is a skill set that does not often times transfer from computer program logic. Again, Trade Logic, is a different world, entirely. Anyone that has spent the time, energy, effort and the years in development of a genuine trading system architecture, already understands this fact.

So, I'm not here to bust your balls because you might be an incompetent developer of Trade Logic. So, why bust my balls because I might be an incompetent developer of MQL?

Seriously, thanks for the help. I think we were both having a bad (frustrating) day.

 
RaptorUK:

Why not ?



The answer is in the OP.

This tells me that that several of you have not bothered to read the OP. I read every OP that I intend to respond to, before actually responding - on any forum I visit. That way, I don't waste time, energy and effort, yielding non-sequitur reply.

The Visual tool that I use to build EAs, does not explicitly execute all MQL functions/commands. Therefore, as posted previously, the use of Print, Comment, etc., will not yield text on a chart.

The "if" statement, is also not necessary in this tool, as the tool itself is a code generator that does not require that instantiation of programmatic arguments such as "if," "for," "while," etc. It simply checks to see if your core MQL syntax is correct and then returns either "true," or "false" by launching several order execution function that are common to MT4.

I put all of this into the OP, that's why the OP was initially long - to give respondents the necessary background, before they replied.

 
onewithzachy:

You proud about yourself - get out of your room there's people smarter than you !

Just to remind you, before you judging something, learn about it first.



Funny. You don't see yourself as being "proud" when you call yourself criticizing someone for not knowing MQL. Yet, if that person can write trade logic circles around you, you all of a sudden find them "proud," but not yourself.

I always thought that in the business of trading, the smarter was the better trader.


Lovely.
 
WHRoeder:
Since there are no slaves here, there are only two choices: learn to code or pay someone. We're not going to code it FOR you. We are willing to HELP you unless you piss off too many people.

Then why the heck have a board like this anyway? What's the purpose of a board like this? Are you expecting real traders to drop-off their trade logic, in exchange for help with MQL? Otherwise, since there are no slaves here, there are only two choices: Learn to write Trade Logic, or pay someone.

See how that works? Its called the reciprocal.

 

Lovely, board. Just grand. Not to mention very useful. And, its existence makes very good sense - a place where MQL coders can one up each other, with cute code snippets.

I was told the purpose of this board was a place for programmers and non-programmers alike, to share MQL code, get help with MQL code, or otherwise offer something of value to the MQL community.

LOL, that's not what I found, here. What I found here, was arrogance, ego, hypocrisy and the total misunderstanding of Programing Logic -vs- Trade Logic.


Whatever...

 
CFx:

Lovely, board. Just grand. Not to mention very useful. And, its existence makes very good sense - a place where MQL coders can one up each other, with cute code snippets.

I was told the purpose of this board was a place for programmers and non-programmers alike, to share MQL code, get help with MQL code, or otherwise offer something of value to the MQL community.

LOL, that's not what I found, here. What I found here, was arrogance, ego, hypocrisy and the total misunderstanding of Programing Logic -vs- Trade Logic.

Whatever...

Alright,

1. I did criticize you, because even that you admitted that you have lack of programming knowledge, you criticizing MQL. So where's your logic then ?, even with with small amount of knowledge - you think you're right about it - and that also show that you are indeed proud of yourself.

2. We all knows that trading logic is different world with programming logic. There's championship section, where you can see many trader and/or programmer are trying to "run both world in parallel", let alone combine both world into one. You can review them here https://championship.mql5.com// . That's why I said there's people smarter than you out there.

3. None of us get paid around here, it's a labor of love. Every week there's always a rookie come in and this week - I think - you're the star. So, if you don't mind - this is a polite request - there's a book about MQL4 https://book.mql4.com// - it's much more easier than MQL5 or even C++. Why don't you read that book, and when you finish reading it, you can always come back at anytime, and we're always willing to help you with your code.

regards

:D

Reason: