You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
For me it is.
Yesterday i was reading a topic from imamushroom
He was wanting to create a trendline by angle.
i put it in the compiler and it read:
97 lines.
He asked for help and i told him i never use it like that.
I simply use:
For example, which is just one line, but i was unable to help him so i redirected him to Doerk Hilger
But i am not here to prove anything to anybody i just share my experience and for me there is no right or wrong.
You see it's all the same thing.
Wrong is simply less right, and likewise right is less wrong, but they are both one the same thing.
Thank you for recommendation, Marco.
But I agree with Alain. Absoluteley everything which has to do with objects - and this also include any chart objects - is done with OOP much much easier and just more "readable". When I see some native MQL4 code where people just create a simple label, I cant understand why they write tons of code instead of using the standard classes and do it with just 2-3 lines.
One idea behind OOP is: Code it one time right, then do it never again. This includes also the usage of the contained standard classes - its already coded and there is no reason to code it all again the native way and to reinvent the wheel over and over again for such simple things. Just an example, but the principe is always the same.
For simple things, native MQL4 may be ok, but for complex EAs? I dont think so.
It just has to do the job it does not matter how.
Sure everybody has his personal preferences but it is impossible to label them as being right or wrong.
It depends on the goal it was designed for.
A good example is a championship or contest.
It does not matter what language is used or in what way, what matters is that you compile a winner.
And it's that simple.
You can have the most beautiful OOP robot in the world, but if it fails in the market, it sucks.
Like i said it's not about being right or wrong, it's about PERFORMANCE.
And everybody is welcome to argue about this fact, but in the end, it is all that matters.
This topic is about what can do mql5 which mql4 can't do. Up to now there is no 1 valid post to answer that.
@Dirk :
@cozyman :
@Marco :
@coringajoker :
And more...
I don't want to offend anyone, but I am really fed up to see so much people talking about what they don't know.
For me it is.
Yesterday i was reading a topic from imamushroom
He was wanting to create a trendline by angle.
i put it in the compiler and it read:
97 lines.
He asked for help and i told him i never use it like that.
I simply use:
For example, which is just one line, but i was unable to help him so i redirected him to Doerk Hilger
But i am not here to prove anything to anybody i just share my experience and for me there is no right or wrong.
You see it's all the same thing.
Wrong is simply less right, and likewise right is less wrong, but they are both one the same thing.
@Marco :
It's all good, i have tried both and made my decisions.
This doesn't prove anything OBJ_TRENDBYANGLE still exists in mql5. ObjectCreate() exists in both mql4 and mql5 with exactly the same parameters.
Of course but you can not use iOpen iTime iClose etc. in the same classical sense/line and that was exactly the point of having to write more code for the same thing.
LOL. This is just a matter of declaring an array and calling CopyTime() and CopyRates().
LOL indeed.
Looks like 3 additional steps right there.
Alain,
1 - I am not sure if OOP is off-topic. I guess when you ask 100 developers, 95 would claim that MQL4 is top-down (native) coding and MQL5 is OOP. We had this discussion already and the definition of MQL4 and MQL5 is totally confusing. Just take a look at MQL4.com, 99% of the codes are not OOP while MQL5.com is mainly about it. And the thread creator asked for the difference between MQL4/5 and not MT4/5, furhtermore he mentioned that MQL5 is based on C++, not MQL4 and therefore I had to assume, that he is talking about excactly this.
2 - When I say "basically" I mean the basics of the language, the syntax, not all platform specific functions.
3 - Indicators, agree
4 - Trading concept, agree and wrote that already
5 - The CChart class is also available in MQL4, or do you mean something else? (And by the way, many classes of the MQL5 standard library can be used in MQL4 with just a few changes. And this makes sense, cause with conditional compiling you get a higher level of compatibility when you work with such mods.)
6 - I developed a very complex GUI as you know, and the code compiles without changes with the MT4 and MT5 compiler and it works perfectly on both platforms. Maybe you are right and it surely depends on which functions you use, but its also right that you can develop for both platforms without changes. Anyway, I avoid the usage of common functions whenever its possible and use macros or own functions instead to make the code as independend as possible.
7 - Exhausting? Dont, you will be needed ;)
Doerk
@Marco
Maybe there is no right or wrong, but I think there is a good and a bad.
Using common functions and coding native produces a code, which is very sensitive for all changes and which is hard or impossible to convert from one platform to another. Imo this is the bad way.
Strictly using classes produces a code, which is very insensitive against changes and which is easy to convert, is imho the better way which maybe makes a bit more work in the beginning, but at least produces less headache in the future - and - its always reusable when it's coded "right" ;)