stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Migration to 'new' MQL4
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3924
Page 1 of 1
Author:  simplex [ Mon Nov 10, 2014 1:12 pm ]
Post subject:  Migration to 'new' MQL4

Hi fellow coders,

Just like to share a link which I found very useful lately. It's over in FF where broketrader started a thread to teach the basic concepts of the new OOP concept now implemented in MQ4 build 600+.

IMO, his lessons are easy to understand, starting with a simple MA, then extending it with a crossing arrow. Coding a renko indicator is a bit more difficult and a good choice to build up more knowledge and getting used to the idea.

http://www.forexfactory.com/showthread.php?t=473578

Cheers, Jürgen
Author:  SpiderX [ Mon Nov 10, 2014 3:15 pm ]
Post subject:  Migration to 'new' MQL4

Cool Stuff,

Thanks for sharing !

Cheers
Author:  SteveHopwood [ Mon Nov 10, 2014 6:33 pm ]
Post subject:  Migration to 'new' MQL4

Hehe. Re this:
2 Curly braces :

Place the curly braces on the same line as the opening statement.

Recommended:

Inserted Code

if( a < 10 ) {
b++;
}


Avoid :

Inserted Code

if( a < 10 )
{
b++;
}
Just about the first thing I do with any piece of code sent to me is convert it from what he recommends to what he says to avoid - which I find readable. Must drive the Proper Coders here nuts. :lol:

Actually, I doubt it. Proper Coders can read anything.

:xm:
Author:  Baluda [ Mon Nov 10, 2014 7:20 pm ]
Post subject:  Migration to 'new' MQL4

Finally!

The eternal K&R a.k.a. Egyptian Brackets debate.

Go here for more info.

Paul
Author:  SteveHopwood [ Tue Nov 11, 2014 12:10 am ]
Post subject:  Migration to 'new' MQL4

Baluda » Mon Nov 10, 2014 7:20 pm wrote:Finally!

The eternal K&R a.k.a. Egyptian Brackets debate.

Go here for more info.

Paul
Wonderful. I have written lots of Hydra Code. :lol:

:xm:
Author:  simplex [ Tue Nov 11, 2014 11:48 am ]
Post subject:  Migration to 'new' MQL4

Baluda » 10 Nov 2014, 21:20 wrote:The eternal K&R a.k.a. Egyptian Brackets debate.

Go here for more info.

Paul
Great link - love it! :lol:

Jürgen
Author:  simplex [ Tue Nov 11, 2014 12:25 pm ]
Post subject:  Migration to 'new' MQL4

SteveHopwood » 10 Nov 2014, 20:33 wrote:Hehe. Re this:

Just about the first thing I do with any piece of code sent to me is convert it from what he recommends to what he says to avoid - which I find readable. Must drive the Proper Coders here nuts. :lol:

:xm:
Hehe!

First thing I do with most of the code I download before making a decision to use it or not is let my formatting script off the leash to do a bit more to enhance readability than only shifting curly braces to the opening line! :smile:
SteveHopwood » 10 Nov 2014, 20:33 wrote:Actually, I doubt it. Proper Coders can read anything.
Sorry, I can't - that's for sure! So I'm no proper coder? Allright, I can take that. 8-)

I'm working to improve my skills and I'm using tools (see above) to assist me in this process.

But back to business: the thread I mentioned is about much more than the placement of braces. IMO, it's just a recommended reading for any MQL coder who is not yet into the OOP concept (like myself), but is interested (like myself) to start using the new opportunities MQ4 offers now.

BTW: if anybody knows about more resources to support the shift from old style MQL to OOP concepts I'd be happy to receive a link.

Cheers, Jürgen
Author:  xray2 [ Wed Dec 16, 2015 10:33 pm ]
Post subject:  Migration to 'new' MQL4

Thanks Jurgen,
I know this thread is nearly 2-years old, but the info is new to me.
This appears to be exactly what i might need as I have a similar problem atm.
Cheers
All times are UTC Page 1 of 1