MetaTrader 4 Platform update build 1310

MetaQuotes
Moderator
228841
MetaQuotes  

The MetaTrader 4 platform update will be released on Thursday, November 26, 2020. This version provides error fixes and platform stability improvements.

The new build will be available through the Live Update system.

László Müller
41
László Müller  
Dear MetaQuotes software engineers and developers!

There is a small bug in the MQL preprocessor. Please analyse the following code snippet.

#define name_0 Michael
#define name_1 J
#define name_2 Fox

#define defer(x) x
#define paste(x_0, x_1, x_2) x_0##x_1##x_2
#define paste_2(x_0, x_1, x_2) paste(x_0, x_1, x_2)

#define CamelCase_name_0(x_0, x_1, x_2) x_0##x_1##x_2
#define CamelCase_name_1(x_0, x_1, x_2) paste(x_0, x_1, x_2)
#define CamelCase_name_2(x_0, x_1, x_2) paste_2(x_0, x_1, x_2)
#define CamelCase_name_3(x_0, x_1, x_2) defer(x_0)##defer(x_1)##defer(x_2)
#define CamelCase_name_4(x_0, x_1, x_2) defer(x_0)defer(x_1)defer(x_2)
#define CamelCase_name_5(x_0, x_1, x_2) paste(defer(x_0), defer(x_1), defer(x_2))
#define CamelCase_name_6(x_0, x_1, x_2) paste_2(defer(x_0), defer(x_1), defer(x_2))

#define MichaelJFox 1961

void f()
{
    PrintFormat("The year of birth is %d.\n", CamelCase_name_0(name_0, name_1, name_2));  //With Visual C++: `name_0name_1name_2'. With MQL: `1961'.
    PrintFormat("The year of birth is %d.\n", CamelCase_name_1(name_0, name_1, name_2));  //With Visual C++: `1961'. With MQL: `1961'.
    PrintFormat("The year of birth is %d.\n", CamelCase_name_2(name_0, name_1, name_2));  //With Visual C++: `1961'. With MQL: `1961'.
    PrintFormat("The year of birth is %d.\n", CamelCase_name_3(name_0, name_1, name_2));  //With Visual C++: `1961'. With MQL: error.
    PrintFormat("The year of birth is %d.\n", CamelCase_name_4(name_0, name_1, name_2));  //With Visual C++: `1961'. With MQL: error.
    PrintFormat("The year of birth is %d.\n", CamelCase_name_5(name_0, name_1, name_2));  //With Visual C++: `MichaelJFox'. With MQL: `1961'.
    PrintFormat("The year of birth is %d.\n", CamelCase_name_6(name_0, name_1, name_2));  //With Visual C++: `1961'. With MQL: `1961'.
    return;
}
It should also operating without errors with the `CamelCase_name_3' and `CamelCase_name_4'
macros. Something is very wrong with a simple `#define defer(x) x' macro. There is a
small error in the MQL preprocessor for these cases. Please analyse the case with the macro
`CamelCase_name_3'! The result of the preprocessing is simply wrong.

Please fix this issue!

Many thanks for considering my request!

Yours sincerely and best wishes to you: László Müller, Dombóvár, Hungary.

Keith Watford
Moderator
28001
Keith Watford  
Comments that do not relate to this topic, have been moved to "Off Topic Posts".
AwarenessForex
73
AwarenessForex  

Can we get a summary of changes (changelog) of the improvements from the last stable build (b1280, correct?)


Also, some brokers are showing OLD VERSION for some of the terminals.   I assume all builds under 1200 are old now?

------

@László Müller are you suggesting that this same code worked fine in b1280, but does not work now in b1310?   Or when was the last build that the code you presented worked ok?

Philippe Pauleau
277
Philippe Pauleau  

Bug in file Include\Controls\Dialog.mqh still has not been fixed (fixed in MT5).

https://www.mql5.com/en/forum/189473#comment_11419618


This is a bug in standard library in file Dialog.mqh. Fixed in MT5 btw. Add a line to that file as follows:

//+------------------------------------------------------------------+
//| Initialize common area                                           |
//+------------------------------------------------------------------+
bool CAppDialog::CreateCommon(const long chart,const string name,const int subwin)
  {
//--- save parameters
   m_chart_id    =chart;
   m_name        =name;
   m_subwin      =subwin;
   m_program_name=name;
   m_deinit_reason=WRONG_VALUE;
//--- get unique ID
   m_instance_id=CreateInstanceId();
//--- initialize chart object
   m_chart.Attach(chart);
//--- determine type of program
   m_program_type=(ENUM_PROGRAM_TYPE)MQLInfoInteger(MQL_PROGRAM_TYPE);
//--- specify object and mouse events
   if(!m_chart.EventObjectCreate() || !m_chart.EventObjectDelete() || !m_chart.EventMouseMove())
     {
      Print("CAppDialog: object events specify error");
      m_chart.Detach();
      return(false);
     }
//--- get subwindow offset
   SubwinOff();
//--- succeed
   return(true);
  }
CAppDialog create problem when the timeframe change ( from an Example of Metaquotes)
CAppDialog create problem when the timeframe change ( from an Example of Metaquotes)
  • 2017.04.05
  • www.mql5.com
Hi! The following code is an example of metaquotes...
narco
632
narco  

Guys, what is the reason in 2020 that MT4 isn't being constantly enhanced? Sure, platform is now stable but is that enough?

There so many features that can be added (improved alerting, chart and order management tools and built in indicators). It's very clear people are not moving to MT5 but going to TradingView or cTrader for new features.

Surely this is a simply a good business model for Metaquotes to do this?

William Roeder
24217
William Roeder  
narco: Guys, what is the reason in 2020 that MT4 isn't being constantly enhanced? 

All development on MT4 stopped years ago. Only bug fixes.

AwarenessForex
73
AwarenessForex  
narco:

Guys, what is the reason in 2020 that MT4 isn't being constantly enhanced? Sure, platform is now stable but is that enough?

There so many features that can be added (improved alerting, chart and order management tools and built in indicators). It's very clear people are not moving to MT5 but going to TradingView or cTrader for new features.

Surely this is a simply a good business model for Metaquotes to do this?

Unfortunately MQ "allegedly" wants to continue their push for MT5.   So by putting mt4 in bug/security fix-only maintenance cycle, it forces users to either except it as it is or use a new version.  And also limit the selling of new mt4 broker licenses.

I think to some degree it is slap in the face to the MT4 community that gave them their success.....but ultimately "I just trade here".   Not my final decision.

There are more organic ways to grow MT5 userbase.


But at least mt4 is still usable in its current form. @narco do you see something that would be needed in the platform itself that you cannot accomplish with mql4?
narco
632
narco  
AwarenessForex:

Unfortunately MQ "allegedly" wants to continue their push for MT5.   So by putting mt4 in bug/security fix-only maintenance cycle, it forces users to either except it as it is or use a new version.  And also limit the selling of new mt4 broker licenses.

I think to some degree it is slap in the face to the MT4 community that gave them their success.....but ultimately "I just trade here".   Not my final decision.

There are more organic ways to grow MT5 userbase.


But at least mt4 is still usable in its current form. @narco do you see something that would be needed in the platform itself that you cannot accomplish with mql4?

I agree. The main things I would like to see would be a "Dark Mode" for the entire terminal, improved Alerting (ability to set default alerts, auto assign WAV audio to symbol name, set Push/Email/Audio on same alert event. 

Improved chart scrolling and zooming like TradingView.

Nothing too major really, but platform specific and can't really be coded. 

Surely with the millions of users of MT4, why don't MQ canvass opinions on features? This company is going to end up like Kodak.

AwarenessForex
73
AwarenessForex  
narco:
...........

Surely with the millions of users of MT4, why don't MQ canvass opinions on features? This company is going to end up like Kodak.


as long as mt4 remains stable, it will be around for some time.  


Not sure why MQ keep doing things like releasing [beta] builds in broker's download that is greater than the latest build.  For example, a customer downloads mt4setup and installs it for a broker....the build shows 1311.   This should be impossible if the latest stable build is 1310, correct?
narco
632
narco  
AwarenessForex:


as long as mt4 remains stable, it will be around for some time.  


Not sure why MQ keep doing things like releasing [beta] builds in broker's download that is greater than the latest build.  For example, a customer downloads mt4setup and installs it for a broker....the build shows 1311.   This should be impossible if the latest stable build is 1310, correct?

There's being around and there's good business sense to ensure growth and longevity. Shooting themselves in the foot doesn't seem like a great plan.