metatrader 5

About 2 weeks ago, the beta version of Metatrader 5 was sent to a selected group of developers from the MQL4 community. One of them has posted a small review of the upcoming trading platform Below are some of his findings.

We have now the long-awaited MetaTrader 5 and MQL5

metatrader 5
This is not Photoshop - it's MQL5.

Practically, everything what many developers wanted from MQL 5 and Metatrader 5 was implemented and realized at the highest level. The major change in MQL5 is the introduction of OOP (Object-oriented programming). Professional programmers have now more opportunities, but those who learned to write in MQL4, can use the MQL4 programming in MQL5 without the benefit of OOP. The only difference is functionality, the only thing that must be learned. For example, "Bid" and "Ask" variables no longer exist. To get the "Bid" value, we must use the function:
The frequently used functions Low [0] or iLow (Symbol (), PERIOD_D1, 0) are also gone, but you can easily recreate them. Historical data functions have now the opportunity to take the historical data from point to point, from one particular bar to another specific bar or on a specified time prior to this. So now you dont have to take the entire visible range of historical data:
MqlRates rates_arrayG[];
Int Bar=30; // read only 30 bars, beginning from 0;
This innovation greatly save memory and time simultaneously.

Some functional improvements that I expected from MQL5:

- Function OnTimer () for processing timer events ( EA can now be dependent of the tick arrival);
- OnTrade () - function for processing trade events - opening and closing of the trading position or volume change;
- OnChartEvent () - event handling of the mouse and keyboard on the chart.

Function OnTimer () is called, if we pre-trigger the timer in a predefined function OnInit (event handler initialization expert). Example:

//| |
int OnInit()
EventSetTimer(1); //every second, we will turn to OnTimer ()
//| |
void OnDeinit()
EventKillTimer(); // required to cancel the requetst to the timer
//| |
void OnTimer()
MqlDateTime str1;
TimeGMT(str1); // new function to get GMT time
So now we can get control not only on the arrival of tick, as before, but also on a timer, that allows you to write full-fledged program operated in real time. This feature allows us to create more featured systems.

The function OnTrade () is called when any of the trade events is happening: placing orders, StopLoss or TakeProfit, changing levels of stoploss or takeprofit, editing or deleting a pending order.

So the monitoring of trading operations events is now much easier than before. There is no need for the checking of the orders on ticks or bars, what previously had to be done in MQL4. So the speed is now much better, particularly in optimization.

The function OnChartEvent () is called at multiple events. I did not test each, but the list of events is impressive:

- CHARTEVENT_KEYDOWN - keyboard is pressed;
- CHARTEVENT_OBJECT_CLICK - mouse click on the graphical object on chart;
- CHARTEVENT_OBJECT_DRAG - move of the graphical object using the mouse;
- CHARTEVENT_OBJECT_ENDEDIT - finishing editing the text CHARTEVENT_CUSTOM + n - ID of the user events;

With MQL5 we can control the trading and graphics on a new functional level, as was promised by the developers
metatrader 5
Graphic objects allow you to create information panels.

New graphics, buttons, input fields. The control of graphics is now on a fantastic level, you can even insert pictures from files - custom designs for lovers of non-standard design. This is not Photoshop, it is possible with MQL5 and MetaTrader 5. There are new opportunities, you can create your own buttons and their input fields, such as adding an interface button that will close all open orders. Or quick buy or Sell in a single click, with pre-fielded parameters of stop loss and take profit.

If we talk about the terminal itself, the first you will notice is the big number of timeframes. But the abundance of minute timeframe, probably will please those who have so long dreamed about it. Dreamers of non-standard timeframes are one step away from a custom timeframe, which, however, can be considered as unnecessary. Method of data storage is now 1 minute, so there are no more problems with the synchronization of different timeframes - this is a very important technological solution.

metatrader 5
The history folder: no more files with different timeframes:

metatrader 5
Another improvement: Logs can now be cleared.

metatrader 5 statement
Metatrader 5 statement.

About 2 weeks until public beta. ;)


Anonymous said... @ September 24, 2009 at 12:27 PM

Wow!!! Graphic objects are great

W.vanStokkom said... @ September 28, 2009 at 5:30 AM

I can hardly wait to possible4 receive a
public Beta!


Anonymous said... @ October 25, 2009 at 9:34 PM

After testing MT5 beta for a week or more, and reading comments here and other forums, the complaints are along these two points:

1) The No Hedging / FIFO rule the NFA has created and that MT5 explicitly enforces is a truly pathetic.

2) The change in MQL5 from MQL4 and the incompatibility of the 2 is doubly pathetic.

Let me say, I agree with both points and here are some reasons why they have gone this direction.

A) As to the Hedging / FIFO rule, what people don't usually think about is that stocks, options, and futures all follow this method of accounting. I assume that the Futures Brokers, who really control the National FUTURES Association, want a piece of the forex market. So, they just make all NFA forex brokers adhere to their accounting standards and voila, it is much easier for them to enter the market and get their current customers to enter the forex market. Also, MetaTrader wants to get into the futures, stocks and options trading game, so they had to have this kind of trade accounting to even compete. It's cr-p, but it is an explanation.

B) As to the MQL5 compatibility issue they have moved to a much more object orientated programming model. Events, properties, objects, etc are now all part of the language. This is much more of the model that those outside of the forex market understand. Why they didn't do what say NinjaTrader did and allow for C# code is their decision, but they do get the advantage of controlling the feature set better and locking people into their codebase more.

In sum, I think the MT5 release is as much for non-forex traders as it is for forex traders. We have always known that the guys who make MetaTrader know a think or two about programming, but not much about trading...and this this is just more evidence of that fact.

Besides there are other great MT4 plug in tools that allow for a much better and fully featured trading interface for the platform.

Sharon said... @ January 15, 2010 at 3:02 PM

Easy to draw S&R lines! Would be great if the 2hour time frame is included. Tx.

Post a Comment