Problems with Time() - page 8

 

Yeah thats a nice script dabbler ... anyone new to coding should pay attention to that. So it should mean it is possible to re-arrange the OP code to make it work properly without parenthesis. it might even be more efficient that way.

 
SDC:

Yeah thats a nice script dabbler ... anyone new to coding should pay attention to that. So it should mean it is possible to re-arrange the OP code to make it work properly without parenthesis. it might even be more efficient that way.

No, I disagree with that. "New to coding" people, and others, should use many lines rather than trying to stick all possible tests on one line. The OP is using a "tool" which (apparently) requires all the logic in one place. But in ordinary MT4 the tests should be split up on separate lines or in functions so you can put Print statements between and see where the logic has got screwed up (as is often the case :-)

Adding brackets in no way increases the computational cost. And in MQL4 putting logic on multiple lines is actually less computationally expensive. So there are only wins using multiple lines and no downside :-)

 
It really doesn't matter if something is computationally efficient or inefficient if it doesn't work as intended . . . make it work first . . then spend the rest of your life optimizing it if you want or need to. ;-)
 
SDC:

Yeah thats a nice script dabbler ... anyone new to coding should pay attention to that. So it should mean it is possible to re-arrange the OP code to make it work properly without parenthesis. it might even be more efficient that way.


Really. So, logically, its just fine after all and might even be more efficient - after some "re-arrangement."

Sometimes I think this site truly defeats its own logic for existing. All that non-sense, just to get to "it might even be more efficient that way." Really, now.

Unreal.

 
dabbler:

Interesting, as is this

https://www.mql5.com/en/forum/126224

It helps to know the background of what we are talking about!


I have been avoiding this thread because there is so much upset on all sides. It just seems so unnecessary.


Maybe the OP should start a new thread so respondents don't have to read 200 posts with 100% accuracy to figure out what is going on.

And maybe everybody could stop calling people names.


Given the absolute wrong approach to my thread by the really-full-of-themselves brigade, the only new thread I would ever think about starting on this forum, is the on that tells all non-MQL script writers to stay away from this viper pit of a forum - for their own benefit.

 
dabbler:
Well interestingly I did check that and it seemed ok. MQL4 and C (and every other computer language) has a set of precedence rules which give an exact interpretation of a logical expression.


No kidding - I knew that, and I'm not even a developer! Why do you think I wrote it that way to begin with? As a non-programmer, I took the most logical approach available, and set each expression in the most logical order, without knowing anything about the curve-ball need that MQL places on the segmentation of individual arguments that use logical operators, by using parenthesis. Who the heck is going to know anything about such a requirement, unless they code MQL each day, all day long.

From a non-MQL script writer's standpoint, given that I just began using MQL as a means of executing trades outside of my prototype trading system which does not use MQL, I would say that this first run wa pretty spot on from a pure logical standpoint. The error (if there was any) was not logical, it was SYNTACTICAL:


Day() == 1 || Day() == 2 || Day() == 3 || Day() == 4 && TimeHour(TimeCurrent()) >=23 &&
 TimeMinute(TimeCurrent()) >=57 || Day() == 5 && TimeHour(TimeCurrent()) >=21 && TimeMinute(TimeCurrent()) >=57


There's a difference between one who gets the syntax wrong, and one who simply has no logical understanding about what they are doing, whatsoever. But, of course, the I'm-An-MQL-Gurus on this board, failed to realize that much. Given the length of time I've been exposed to MQL, and given the complexity of the entirety of my EAs, I doubt that most newcomers to MQL would have even got this far with what I'm trying to accomplish.

The fact that I was merely syntactically in error, says everything I need to know about this boards response to my OP.

Like I said, Traders, Trade. I have not have the extra time on my hands over the years to develop keen programing skills. Likewise, Coders, code. And, I have met precious few of them over the years who were capable of writing a single line of repeatable trade logic that contains historically significant pattern recognition, sufficient to build real capital and thus real wealth.

I have a full integrated trading system that runs near flawlessly. My only interest in MQL, is start the POC exploration of lower time-frames, which my prototype does not take advantage of at this time.

This would be a great site, if it were not for the overwhelmingly wrong headed coding-guru attitude that defeats its purpose for existing. Maybe one day you'll figure out that clue.

 
RaptorUK:
It really doesn't matter if something is computationally efficient or inefficient if it doesn't work as intended . . . make it work first . . then spend the rest of your life optimizing it if you want or need to. ;-)


It works just fine, now. No thanks to anyone on this board, as I figured on my own, a way to get the time based iteration I need and across the range of time that is necessary to make the trade logic come to life. Essentially, the code scans a series of iCustom modes in multiple time-frames, for specific configurations across a specific range of time unique to each mode.

You only saw the Time() based piece, here on this forum. The EA is actually comprised of five (5) different EAs, each one monitoring the trade performance of the other, so as not to trigger subordinate signals, and to allow superior signals to persist (as the position remains open). The overall system is designed to remain in the market as it transitions from the vertical into the horizontal and back to the vertical. Not something easily designed from a trade logic standpoint.

Certainly, not your typical (all to familiar) cross-over strategy and there are no "standard" indicators in use.


The ONLY thing that matters in the business of trading, is the final trade logic that you deploy to market. Everything else, including the grand programming skills that one thinks they have, won't matter a hill of beans, if you can't write rock solid Trade Logic.

Nuf said, on this subject and topic me.

 

For those who need to learn more about how to develop trade logic that works, I've created a temporary laboratory of sorts while I conduct my research into whether or not my custom indicator designs have lower time frame validity. The site is: CollaborativeFx.forumer.com. I've taken site down until I get through enough Bot designs and am able to present findings.

[For the positive minded people] You can follow my return to the CollaborativeFx.forumer.com project online at Twitter @CollaborativeFx. The CollaborativeFx, is an R&D site ONLY. There are no commercial products allowed on the site, and there is nothing for sale on the site. It will be a site dedicated to positive minded people interested in discovering what makes good trade logic possible.

It is NOT a site dedicated to MQL. On the site, MQL will be nothing more than a tool for building several proof of concepts, related to a handful of core custom indicators that I have developed from the ground-up over the years. Of course, you will always have other sites MQL programmers. The CollaborativeFx, is all about Trade Logic Development.

Reason: