C++ and Metatrader 5

 
Hi! 

My name is Rodrgo Arthur, I'm living at Brazil and I have 24 years.
I studied theology at the Presbyterian Seminary. Now I want to study 
Economics Science and I'm studying C + + for learn how to use Metatrader 5 
and Metastock. 

I'm reading a book of Deitei, not sure if it will be useful. 
Here few people invest in the financial market and the number 
of people using Trading Softwares is quite low.

I would like to ask you for information about books (MQL5 and C++) 
that can be useful for use with MetaTrader 5.

Thanks, have a great week and God bless everyone.
 
rodrigoarthur posted  :
Hi! 

My name is Rodrgo Arthur, I'm living at Brazil and I have 24 years.
I studied theology at the Presbyterian Seminary. Now I want to study 
Economics Science and I'm studying C + + for learn how to use Metatrader 5 
and Metastock. 

I'm reading a book of Deitei, not sure if it will be useful. 
Here few people invest in the financial market and the number 
of people using Trading Softwares is quite low.

I would like to ask you for information about books (MQL5 and C++) 
that can be useful for use with MetaTrader 5.

Thanks, have a great week and God bless everyone.

With regard to C++, even though MQL5 represents a sizeable proportion of C++, in my opinion it would be somewhat confusing to try to learn C++ on the path to learning MQL5.  Far better to read the MQL5 help files from end to end, and learning from the now extensive set of example code.

The confusion in learning C++ at the same time as MQL5 would come from the many aspects of C++ not supported in MQL5, for instance, in order of how much I would like to see them introduced:-

  1. Operator overload (this is the C++ feature which I most often miss - it allows the development of much cleaner and easier to read code)
  2. Pre-processor directives such as #ifdef
  3. Parameter replacement in macro expansions like #define ADD(a,b) (a+b)
  4. Parameters in constructors (would avoid the frequently necessary Init() function call)
  5. Polymorphism
  6. Templates
  7. True pointers

Rosh - can you comment on whether any of these may be introduced in future?

Paul

http://paulsfxrandomwalk.blogspot.com/ 

Regularly emailing the status of an account
  • 2012.06.14
  • Paul
  • paulsfxrandomwalk.blogspot.com
Prompted by a query, I thought I'd post a useful little utility that I have used for ages which emails the status of the account every hour.  After lengthy deliberation I decided to call it .... EmailStatus.  With only a small modification it could be used to log the status to a file, and the time...
 
phampton:

With regard to C++, even though MQL5 represents a sizeable proportion of C++, in my opinion it would be somewhat confusing to try to learn C++ on the path to learning MQL5.  Far better to read the MQL5 help files from end to end, and learning from the now extensive set of example code.

The confusion in learning C++ at the same time as MQL5 would come from the many aspects of C++ not supported in MQL5, for instance, in order of how much I would like to see them introduced:-

  1. Operator overload (this is the C++ feature which I most often miss - it allows the development of much cleaner and easier to read code)
  2. Pre-processor directives such as #ifdef
  3. Parameter replacement in macro expansions like #define ADD(a,b) (a+b)
  4. Parameters in constructors (would avoid the frequently necessary Init() function call)
  5. Polymorphism
  6. Templates
  7. True pointers

Rosh - can you comment on whether any of these may be introduced in future?

As far as I know:

  1. Not now, may be later (It's difficult to promise)
  2. Never
  3. Hardly ever (I think it won't)
  4. Not planned (may be changed ?)
  5. Present
  6. Never
  7. Never
I think it would be better if stringo answered these questions.
 
Other day i was reading a post on your blog about Oxygen and MQL5.
I met your blog through metatrader5.blogspot.com 
You was saying about C language, and other blog said about C++.
Reading a book i saw that C is not equal to C++.
C++ is a language based on C, as an advanced version, i don't know.   
I thought that would be useful learning C++ for understand MQL5.
I started reading User Guide, but did not understood. 
The user guide tell about many concepts that i dont know (array...),
i dont know language of programming. I can speack Greek, Hebrew, 
Latin, and other languages, but programming language is very hard.
I bought the book Mechanical Trading System (Wiley) too, 
but did not started to read it because I will not understand.
Subscribe
  • metatrader5.blogspot.com
One of the big improvements of the new Metatrader 5 strategy tester is the possibility to use individual calculation frameworks ( agents ) to distribute the load within the multiple (remote) cores and as result, to greatly increase the speed of trading strategies optimization / calculation. The agents can be installed on remote computers in...
 

rodrigoarthur posted # :

Hi rodrigoarthur,

thanks for reading my blog.  I think I was referring to C in the context of using Doxygen to document MQL4, which is a C derivative. 

C++ is the Object Oriented superset of C.  Because it is OO, there are a number of parts of C that are rarely used in C++ coding even though they are still available, such as the acquisition of memory (malloc).  One can write in C++ in a procedural C style, but the best way to write C++ code is very different.  If you really want to learn C++, then the book "The C++ Programming Language" by one of the original architects of C++, Bjarne Stroustrup, is an excellent choice, and very readable.  For MQL5 purposes though you would need to skip over the differences I mentioned earlier.

Paul

/go?link=http://paulsfxrandomwalk.blogspot.com/  

 
http://paulsfxrandomwalk.blogspot.com/2009/11/auto-generated-documentation-for-mql5.html

and

https://www.mql5.com/en/articles/12

"The C++ world also has a number of documentation auto-generators, with Microsoft's SandCastle and Doxygen being two leaders. I decided to see how well Doxygen could document MQL5, which is in essence a customised subset of C++. To me this is an important step in the maturity of MQL5, because the complexity of the language is easily capable of fostering some quite large class libraries."

Yes, i read C and you wireted C++. I was some confused about C and C++, i was thinking that they are the same language before of read about. I misunderstood. 

OK, many thanks! I will read the books that you have mentioned and try understand some thing lol :)

Your blog is very good
Auto-generated documentation for MQL5 code
  • 2009.11.09
  • Paul
  • paulsfxrandomwalk.blogspot.com
I submitted this blog entry to Metaquotes when I wrote it, and I'm pleased to announce that they have now published it on the MQL5.com site. The article includes a very useful MQL5 source code help file which I intend to update from time to time when new code is released. Here's the introduction: Most Java coders will be familiar with the...
 
phampton:

rodrigoarthur posted # :

If you really want to learn C++, then the book "The C++ Programming Language" by one of the original architects of C++, Bjarne Stroustrup, is an excellent choice, and very readable.
I don't think that book is the best one for learning C++. It should be better to recommend another book.
 


Rosh,

I can buy more books, do you have some  recommendention?

I have:
C++ How to Programam, Deitei, 3º Edition
C: The Complete Reference, Prentice-Hall, 3º Edition 

 
rodrigoarthur:


Rosh,

I can buy more books, do you have some  recommendention?

I have:
C++ How to Programam, Deitei, 3º Edition
C: The Complete Reference, Prentice-Hall, 3º Edition 

Don't buy any more books, those are enough. 

Personally I think there is no point learning MQL5 via a C++ book. Obviously the place to learn it is via the MQL5 book. Unfortunately it's not out yet, which puts u in a tough spot. Anybody who already knows C++ will have no problem learning MQL5 via the documentation only, but for u it would be extremely difficult.

My recommendation is to either wait for the MQL5 book to come out or just stick to learning C++ as a separate language (and forget about MQL5 for the time being, you can come back to it later).

 

One question, I noticed that there is a metatrade5 framework for python, can I get one for c ++, I am making a robot with high performance artificial intelligence but I wanted to develop it exclusively in C ++ because of Cuda, I know it is possible to use OpenCV in mql5 but did not have the performance that I would like, Python even having many artificial intelligence frameworks I do not like as much as C ++ in terms of performance, I found this link that has some guys that serve as a framework, but as they could see I am terrible with Human languages kkkk. I prefer the machine ones, so I have a little trouble finding this blessed framework for C ++.


Link of some frameWorks

https://github.com/topics/metatrader5

RandomKori/ForexTF
RandomKori/ForexTF
  • RandomKori
  • github.com
Нейронные сети для Forex на Tensorflow. Contribute to RandomKori/ForexTF development by creating an account on GitHub.
 
Thiago Cristian Pedroso:

One question, I noticed that there is a metatrade5 framework for python, can I get one for c ++, I am making a robot with high performance artificial intelligence but I wanted to develop it exclusively in C ++ because of Cuda, I know it is possible to use OpenCV in mql5 but did not have the performance that I would like, Python even having many artificial intelligence frameworks I do not like as much as C ++ in terms of performance, I found this link that has some guys that serve as a framework, but as they could see I am terrible with Human languages kkkk. I prefer the machine ones, so I have a little trouble finding this blessed framework for C ++.


Link of some frameWorks

https://github.com/topics/metatrader5

code your DLL.in C++
call it from MQL5