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?
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
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.
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.
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.
Please provide an example of "procedural elements of MQL5 code" that are not present in C++.
Does C++ natively have all of these?:
- www.mql5.com
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.
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.
Forum on trading, automated trading systems and testing trading strategies
Ryan L Johnson, 2026.08.09 00:07
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.
The OP's question at issue in our discussion, and which I answered, is:
Forum on trading, automated trading systems and testing trading strategies
Jitterbug, 2024.01.13 00:27
Are there coding benefits in the types of things you can create/do with MQL that are longer harder in C++?
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."
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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.