MQL4 - C++ - Delphi

 

I started using MT4 for strategy testing recently. In FT i can program in delphi or in C++. I have previous design- and programming experience in Basic and VB.

In MT4, C++ and Delphi I have zero experience. I want/need to program in FT for sure and maybe also in MT4. Since I have a blank start with the 3 languages mentioned before, I hope you can help me to make the right decision.

Questions:

1. MT4 looks quite like C++ to me (but I have looked only through a basic C++ course). Is MT4 just another name for C++ or does it really differ.? If so (in a percentage) how similar would you qualify them?

2. For forex tester the best way to go would be delphi (since FT is written in that). Can EAs in MT4 also be programmed in Delphi?

3. If FT programming is as stated the first priority, what would you advise me to do? (=start learning)

Thanks a lot for your input

 

Forget C++.

mql4 is just a stripped down version of C (without the ++ and without many other things and also without the speed).

The mql4 language is so simple that you can learn the syntax in half a day but you also need to read (and understand) the API documentation (the mql book and the docs) at least once (one weekend) and then you know enough to try starting some small experimentation.

Delphi (or its free counterpart Free Pascal / Lazarus which does not cost you any money) is much more recommended for learning programming in a statically typed language than the chaotic and frustrating C++ could ever be. Everything is clean and structured and straightforward, the performance and the language features are on par with (or even superior) to C++

Learning more than one language does not use up any storage room in your brain, quite the opposite, it makes more room for new ideas! So feel free to learn as many languages as you want, just start learning with any language, learn a new one every few months, just for fun. Every new language will make you a better programmer in all other already learned languages too!


 

Hi,

I,m looking who has an experties in ex4 indicator or TPL to convert them into Forex tester indicator, could you please tell me how do i do it, it is for my back test forex tester, i always do testing with diffrent custom indicator MT4,

so do anyone has some guide to teach me how...

from hjabu1188

hjabu_hrh@hotmail.com

 

7bit, thanks for the clear advice. since FT was the first priority i will start as you recommend with delphi/lazarus.

how may full time days will it take me you think before being able to make an average complicated program? (in general i am a fast learner)

 
hjabu, read my question first: i have zero experience in delphi/lazarus programming. you should find somebody else.
 
maurits2000:

7bit, thanks for the clear advice. since FT was the first priority i will start as you recommend with delphi/lazarus.

how may full time days will it take me you think before being able to make an average complicated program? (in general i am a fast learner)

This is not easy to answer. It depends on how hard you are willing to work, how much dedication you have, how strongly you are motivated. Most successful programmers became what they are because they had the overwhelming desire to *understand* how something works and did not stop until they succeeded. And then they already started learning the next complicated stuff. They never ask "how long until I have learned it", they don't perceive the learning phase as something annoying that has to be overcome as fast as possible, quite the contrary: The journey is the reward, the learning provides the most fun and the most satisfaction. Obviously this is not everyone's cup of tea. Most people would give up too early because of impatience or they would not be able to find any fun in learning at all. They would not be able to become programmers.

I would suggest start learning to program (start with something applicatory like the FT programming that you need to have some initial motivation) and then see whether you find this a fascinating experience and you feel the urge to learn more. If this is the case then you will not ask how long it takes, you will not ask for an end, you will just continue to learn until the end of your life.

 

You learn to program by having something you really want the computer to do for you, this motivates you to solve the puzzles when what you have written does what you TOLD it to do NOT what you WANT it to do.

Programming is about taking a few simple ideas and using your imagination to create what you want. The genetc code of life is based on 4 proteins, yet look what years of need have done with just those four!

programming is about assignment, comparason, simple arithmatic, data recieved or fetching and response.

 
7bit:

mql4 is just a stripped down version of C (without the ++ and without many other things and also without the speed).

Just for the record... Some aspects of the syntax of MQ4 are similar to some aspects of the syntax of C, but that's also true of Javascript (among others).

Personally, I think that a comparison of MQ4 and Javascript makes more sense. C has explicit memory allocation and de-allocation, which is notorious as a source of bugs, whereas MQ4 and Javascript are "managed" environments and do not. It's tenable to think of MQ4 as Javascript plus strong typing minus objects.

 
jjc:

Personally, I think that a comparison of MQ4 and Javascript makes more sense.

I would like to see JavaScript completely separated from most of the other C-like Syntaxes. JavaScript is actually mostly a functional language (which neither C nor C# nor Java nor C++ is), it shares many similarities with LISP (except the syntax).

Crockford (ultimate JS authority) himself characterizes it as Lisp in C's clothes: http://www.crockford.com/javascript/javascript.html

Maybe it would be more appropriate to compare mql4 with some kind of stripped down "Java without classes", in this case maybe I should take back my C comparison.

 
7bit:

JavaScript is actually mostly a functional language (which neither C nor C# nor Java nor C++ is), it shares many similarities with LISP (except the syntax). [...]

Well, yes, but I'd guess that a majority of the code ever written in the language - including the Javascript in the webpage you're reading right now - is purely procedural. If you prefer, you can take my earlier remark "...MQ4 as Javascript plus strong typing minus objects" and recast it more precisely as "...MQ4 as the procedural bits of Javascript plus strong typing". I'm really just making the point that MQ4 and C are fundamentally different both in theory and in practice because one is managed and the other is unmanaged.
Reason: