Aside from the perks the broker has to offer, I do feel that MetaTrader is not the best platform to build EAs. MQL = C++, they are using C++ as their base code. It's written in their documentation page: https://www.mql5.com/en/docs
While cTrader (cAlgo) uses C# as their base code.
Take example one of my EA, Tunnel Martingale (TM). If you follow my thread (https://www.forexfactory.com/showthread.php?p=12966378) in the commercial section, it was actually built using MQL. Because the logic is simple! Start a market position randomly, then put pending order on the opposite direction, once the pending order is reached/executed, then place another pending order on the opposite direction, etc..etc. A strategy is just strategy, failed, sucked out the investment dry, then go back to the drawing board again.
As ideas to improve get just a little more advance, coding with MQL is just getting more difficult. One of the ideas to improve is, instead of running the martingale series unlimited time and indefinitely, we could limit the timeframe to only just at a specific date and time for specific interval/duration only. Now here's the catch.
The way C++ handles date and time is currently using the "ancient" data type that is based on integer number that represents ticks that are calculated since 1st January 1970! That's like some pre-historic stuff. So, now I understand that if I want to define a specific date and time from A to B, I have to know the tick representation of that date.
So, if I want to write that the TM starts at 31 March 2020 12:00:00, I have to write 637212528000000000 into a parameter, variable, or any method of communication between myself as a user to the EA. That's not it, DateTime functions are very limited in MQL.
Now, another challenge is that I want to introduce an object for the dates, in the input parameter. There is no way, both MQL and cAlgo to define complex input parameters. But one can do that by introducing a file configuration, something like JSON or XML. In MQL, it takes some lines just to read a file. You need to understand the concept of the pointer, you need to check if the filehandle is closed, if not closed you must close the handle, if not it will get stuck etc..etc.
In cAlgo, this task can be done just by calling a function then assign it to a variable. Just 1 line.
Now, talk about the object in the programming world, once we read the configuration file, we can sort of access the configuration using OOP, in which inside the object also has some array of another object etc..etc. OOP in C++ is just completely wasting time. Here's why:
- You can't simply read XML or JSON into an object in C++. There are too many steps to achieve this, while in cAlgo can be done in 2 lines the minimum.
- You can't simply sort an array of objects (and this is just stupid). You can sort if the data type to sort is the number (int, long, short), not with another data type like date time. And the sorting is just that simple, there's no other function. One must create their own sorting function, and doing this just wasting my time by a lot.
Just those 2 reasons, I have given up my chances and move to cTrader.
It is not that I don't want to learn MQL. But hey, writing EAs supposed to be just like writing a business application, it must be robust, fast, quick, simple, keeping the less important stuff getting along the way. Unless, if you are writing code for a machine, robotic stuff, or gaming, or code that needs faster access to machine language layer, then C++ is the best choice.
Just imagine, you want to go from your standing place now in Hawaii to New York your destination. With C# (or cTrader/cAlgo), you just need to use (or buy) any mode of transport available out there, cars, ferry ticket, airplane ticket, buses, trains, anything to achieve your destination fast. With MQL, I feel like living in the year 1781, where we need to build a boat with our hands to get there.
So, how's your experience, folks?