Can I write raw C++ for my trading algorithm in visual studio to use in MT4 or MT5? or do I have to use MQL language?

 

I read somewhere MQL 4/5 is not as fast in execution as using C++ to write algo`s, granted i`m new. I just wanted to preferably use raw C++ instead of learning another scripting language.

Are there coding benefits in the types of things you can create/do with MQL that are longer harder in C++? Thank you the feedback is very valuable to me.

I`m also frustrated that some brokers I want to use dont use MT5 or Ctrader, just MT4. Why would that be? Seems backward.

Thank you. Looking forward to this journey.

[Deleted]  
Your topic has been moved to the section: Expert Advisors and Automated Trading
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
[Deleted]  
Jitterbug: I read somewhere MQL 4/5 is not as fast in execution as using C++ to write algo`s, granted i`m new. I just wanted to preferably use raw C++ instead of learning another scripting language.

Are there coding benefits in the types of things you can create/do with MQL that are longer harder in C++? Thank you the feedback is very valuable to me.

I`m also frustrated that some brokers I want to use dont use MT5 or Ctrader, just MT4. Why would that be? Seems backward.

Thank you. Looking forward to this journey.

You have to code in MQL, which is a compiled language, but it is very similar to C/C++ and just as fast, especially MQL5.

You can also make use of DLL's as support, and those can be coded in pure C++ or C# if you wish.

MetaTrader 5 does also offer a Python API, but it is much more limiting than using MQL5.

As for your observation about more MT4 than MT5 brokers, I observe the opposite, especially regarding reputable and regulated brokers.

There are certainly a great number of unregulated "sketchy" MT4 only brokers, but the reputable and regulated ones usually offer both MT4 and MT5 platforms.

 
deeply appreciated for the feedback thank you!
 
Jitterbug:
Are there coding benefits in the types of things you can create/do with MQL that are longer harder in C++?

The procedural elements of MQL5 code are not present in C++ code. Just look at all of the MQL5 standard functions, for example. I prefer to use MQL5 procedural code instead of having to access external files (OOP)─as much as possible, anyway.

Jitterbug:
I`m also frustrated that some brokers I want to use dont use MT5 or Ctrader, just MT4. Why would that be?

If a broker-dealer switches from MT4 to MT5, that broker-dealer must switch out all of the accompanying MT4 servers, etc. as well. Leases or purchases of MT5 servers (and service thereof) are not cheap.

Also, less developed regions of the world might actually prefer MT4 due to the prevalence of older hardware in those regions.

 
Ryan L Johnson #:
The procedural elements of MQL5 code are not present in C++ code.

Please provide an example of "procedural elements of MQL5 code" that are not present in C++.

 
Vladislav Boyko #:

Please provide an example of "procedural elements of MQL5 code" that are not present in C++.

Does C++ natively have all of these?:

Documentation on MQL5: List of MQL5 Functions
Documentation on MQL5: List of MQL5 Functions
  • www.mql5.com
All MQL5 functions in alphabetical order...
 
Ryan L Johnson #:

Does C++ natively have all of these?:

If you mean the need to exchange data with a DLL, then in my opinion, programming paradigms (procedural vs. object-oriented approach) have nothing to do with this and mentioning them only confuses.

By the way, as far as I know, nothing prevents you from programming in C++ in a purely procedural paradigm.

 
Vladislav Boyko #:

If you mean the need to exchange data with a DLL, then in my opinion, programming paradigms (procedural vs. object-oriented approach) have nothing to do with this and mentioning them only confuses.

By the way, as far as I know, nothing prevents you from programming in C++ in a purely procedural paradigm.

 
Ryan L Johnson #:
Just look at all of the MQL5 standard functions, for example.
What should I see there? If it's the "terminal API," then it boils down to data exchange with the DLL. For the rest, it shouldn't be hard to find a C++ equivalent, I think.
 
Vladislav Boyko #:
What should I see there? If it's the "terminal API," then it boils down to data exchange with the DLL. For the rest, it shouldn't be hard to find a C++ equivalent, I think.

The OP's question at issue in our discussion, and which I answered, is:

I regard MQL5 Functions, Technical Indicators functions, etc. as shortcuts because C++ isn't 100% dedicated to trading. Therefore, it is longer/harder to code all of that out in "long form."