Metatrader 5 and MQL 5 Development - questions and answers:

Q: Can you make available BNF description of MQL5? If not BNF, do you have formal syntax descriptive document? If no formal syntax description, why not?
A: You can use C++ BNF description (we cannot publish it because this form is hardcoded in our project)

The differences as compared to C++ are:

* No class inheritance
* No address arithmetic
* No operators overload (it will probably be included later)
* No 'goto' operator
* No ternary operation expr ? op1 : op2; (it will probably be included later)

The syntax description will be embedded in MetaEditor help files.

Q: Can you make available Client Terminal Functionality Documentation? Eg, callable functions, global variable functionality, error code handling embeded within Terminal instead of current random hit and miss programmer attempts at error handling?
A: No, we cannot as yet. You should consider the functionality described in MQL4. However, the functionality will be expanded considerably.

Q: What do you see as cut off date when MQL4 will no longer be accepted as platform? Will all MQL4 S/W become redundant unless migrate to MQL5 syntax...?
A: You should not worry about "cut-off" date for MQL4. The upward compatibility of the languages will be kept, with some rare exceptions.

Q: What is the syntax's difference between MQL4 and MQL5?
A: It may be difference between OrderSend (MQL4) and OrderSend (MQL5) function calls. But this is no matter of MQL5 syntax - it is just feature of Metatrader 5 trading platform.

Q: Will MQL5 be multithread to take all quad-core processors capacity on Tester?
A: Tester is planned to be multithread. But this is client terminal feature not MQL5.

Q: Is it planned that MQL5 will come out for MT4, not with a new Metatrader 5?
A: No, it is not. MQL5 will come out for Metatrader 5. As was said in the interview, "the development of Metatrader 5 is in full swing, and the development of MQL5 is at its closing stage".

Q: Will this new MQL5 support event-driven programming? In event-driven environment, we can just define what kind events we want to handle and write a routine (function) to process that event.

Automatic trading basically processes events that occur: event when an indicator hits certain value, event when price triggers an order, event when an open order is being closed, event when an open order causing margin call/stop out, etc. But in MQL4 we are lacking such a feature, so the solution is quite unnatural because we have to check every condition we need to know inside the start() function on every tick of the applied chart. Consider an example that an account is nearing a stop-out because of an open position. However the EA is applied only to (unfortunately slower) one chart, different from the pair currently traded. It misses a call to start() and stop-out happens. This wouldn't happen if there is an event-driven function to handle the event.

A: Events are planned. multitimeframes and multicurrencies testing planned too. multithreaded tester optimization... But these all things are Metatrader 5 features not MQL5. Debugger is planned. What is event processing in the MQL5? Just appropriate functions like OnNewTick, OnNewBar, OnOrderClosed, OnPendingTriggered, OnAlert and so on placed in the events handling queue. That's all. Events handling (first part of event processing) is matter of Metatrader 5 not MQL5.

Q: Does language design contain a more flexible (read usable) #define syntax; eg, parameters. Basically, minimal implementation as per C. Preprocessing of source code is old and known task with many code bases to choose from. Preprocessing does not impact compiler and added benefits of macro/define functionality are enormous.
A: Preprocessing was introduced in the pure C for portability purposes between different platforms and compilers. Preprocessing causes some hardly detectable errors. The answer is "No". Simplest #define only.



Robert said... @ April 19, 2009 at 11:23 AM

I would like to see the ability to plot Constant Range bars, or momentum bars, AKA PIP Range bars for charts instead of time based charts. That would be the biggest improvement in my book.

Jani said... @ May 14, 2009 at 12:25 AM

.. well that would help retail traders too much.. brokers would not like it...;-)

Forexturtle said... @ May 15, 2009 at 4:44 AM

How will MT5 be beta tested for the retail market? Are you forming a beta test group?

miranon said... @ June 16, 2009 at 6:18 AM

2 Robert: Only 3 types of charts are available in MetaTrader 5: broken line, Japanese candlesticks and bars. Constant Range bars etc could be made via indicators...

2 Forexturtle: MT5 will be tested via open public beta, it will be available end June. For more information look: and the mql4 forums. I will post a link as soon as the beta is available.

Robert said... @ June 26, 2009 at 8:34 AM

That's my point, instead of having to do CR bars as an indicator, involving the use of way more RAM, and only being able to display the last few (X) amount of bars, I would like to see it do CR bars natively, same as Candlestick and bar charts. Simply put, it would be an option the same as broken line, candlesticks and bar charts. I realize that it's way to late to do this in this release, but would like for it to be considered in the very near future.

Post a Comment