MT4 MT5 using in C++ engine

 

I was wondering if anyone is using C++ to build/test strategies that are comparable with MT4 and MT5 with matching trades?

 
Why bother? Anything you can do with C++ you can with MTx — but C++ can't trade. Why complicate your code?
 
xbotuk:

I was wondering if anyone is using C++ to build/test strategies that are comparable with MT4 and MT5 with matching trades?

If you need the speed and performance, then probably C++ will provide you what you need. I also sometimes use it for the initial optimization to narrow down some of the results.

As long as you can direclty translate your mql code to C++, you will get the precision up to 6 decimals. You can achieve even more depending on your knowledge between C++ and mql code.

For example, you can use open, high, low, and close price to test your strategy in C++, in MetaTrader backtester, also set open, high, low and close price mode to check the accuracy of your C++ code.

You will see that result from both code is converging to same number.

Kind regards

Documentation on MQL5: Constants, Enumerations and Structures / Indicator Constants / Price Constants
Documentation on MQL5: Constants, Enumerations and Structures / Indicator Constants / Price Constants
  • www.mql5.com
Calculations of technical indicators require price values and/or values of volumes, on which calculations will be performed. There are 7 predefined identifiers from the ENUM_APPLIED_PRICE enumeration, used to specify the desired price base for calculations. If a technical indicator uses for calculations price data, type of which is set by...
 
Young Ho Seo:

If you need the speed and performance, then probably C++ will provide you what you need. I also sometimes use it for the initial optimization to narrow down some of the results.

As long as you can direclty translate your mql code to C++, you will get the precision up to 6 decimals. You can achieve even more depending on your knowledge between C++ and mql code.

For example, you can use open, high, low, and close price to test your strategy in C++, in MetaTrader backtester, also set open, high, low and close price mode to check the accuracy of your C++ code.

You will see that result from both code is converging to same number.

Kind regards

That's exactly what i am trying to do is to build my own optimization.

Have you got a C++ project with the core structures in place or know somewhere it has? We can build something out collaboratively if there are sufficient people interested.

Reason: