MetaTrader 4 Platform update build 1320

MetaQuotes
Moderator
228841
MetaQuotes  

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

In particular, the update fixes an error in the optimization of data connections between client terminals and brokers' data centers.

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

Philippe Pauleau
277
Philippe Pauleau  

Thanks.

Could Metaquotes fix the bug in file Include\Controls\Dialog.mqh that was fixed in MT5 but never in MT4.

There is only 1 line to add (to reflect MT5's file version).

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

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...
Christer Wittusen
114
Christer Wittusen  
I have noticed that the last 2 updates, including 1310 seems to have made MT4 a lot slower, laggy and consumption of memory is huge compared to previous versions. I'm not sure if it is the inclusion of MT5 community features or what it is but I have not seen this kind of memory/cpu consumption before that.
valhs
1315
valhs  
Christer Wittusen:
I have noticed that the last 2 updates, including 1310 seems to have made MT4 a lot slower, laggy and consumption of memory is huge compared to previous versions. I'm not sure if it is the inclusion of MT5 community features or what it is but I have not seen this kind of memory/cpu consumption before that.
I can confirm the very slow behavior since build 1320 - very annoying - change from background to foreground sometimes several minutes
Nelson Wanyama
1401
Nelson Wanyama  

An Expert Im working on alerts about a failed init, but it's initialized anyway. It's compillable with both mt4 and mt5, and it works fine on mt5. I decided to put return INIT_FAILED on the first line of OnInit. Guess what happened. It was initialized successfully! How is this even possible?! I'm starting to sense a conflict of interest here. My code is, closed source, but I'll bring it here if need be.
edit: I tried with a featureless expert, and it works as expected. I don't understand what you guys did to this build

edit: Attached problematic file.

Files:
mt4bug.mq4 9 kb
Nelson Wanyama
1401
Nelson Wanyama  

Another bug!

// Raises an error that i is already defined, but compiles and works fine in MT5.
// I beg to revert to the previous build!

void OnStart(){
for(int i = 0; i < 100; i++) {}
    for(int i = 0; i < 100; i++) {}
}
Douglas Prager
124
Douglas Prager  
Nelson Wanyama:

Another bug!

Do you have the following line at the top of your code ?

#property strict

Keith Watford
Moderator
27999
Keith Watford  
Nelson Wanyama:

Another bug!

void OnStart(){
for(int i = 0; i < 100; i++) {}
    for(int i = 0; i < 100; i++) {}
}

I don't see what the problem is.

William Roeder
24216
William Roeder  
Keith Watford: I don't see what the problem is.

It will not compile unless using strict. PICNIC

Keith Watford
Moderator
27999
Keith Watford  
Keith Watford:

I don't see what the problem is.

William Roeder:

It will not compile unless using strict. PICNIC

That's why I couldn't see what the problem is.
I always use strict.

Pilot65
691
Pilot65  

Can we expect a fix of the serious Strategy Tester flaw/bug when it is run in OPO mode ?

The comments here explains the problem:

//******************** Start OnTick() ***************************************************************************************
void OnTick()
   {
// >>> CAUTION  -  CAUTION  -  CAUTION  -  CAUTION  -  CAUTION  -  CAUTION  -  CAUTION <<<
// >>> CAUTION  -  CAUTION  -  CAUTION  -  CAUTION  -  CAUTION  -  CAUTION  -  CAUTION <<<
// This EA controls | Open Prices Only |. Tick data is of no interest. This EA trades higher TFs (M30 - D1), it is NOT a scalper.
// It rejects all ticks, except for the tick that brings the open price of a new bar on the TradeTimeframe (chart TF).
// However due to a bug/limitation of the MT4 backtester (not present in MT5) this EA MUST still be backtested with
// Period M1 and Every Tick. In principal it could be tested with Open Prices Only and on Period = TradeTimeframe, but
// due to the MT4 tester bug/limitation this results in >>TOTALLY WRONG<< trade results.
//
// Suspected cause of the problem: The Tester's trade server is only run/called at bar open event. But to properly handle
// intrabar events (order close on TP/SL, trigger pending orders etc.) it must run at tick events, apparently it does not!
//
        int NumberOfMainBars = iBars(Symbol(),TradeTimeframe);
        int NumberOfFastBars = iBars(Symbol(),PERIOD_M1);
        // Trade Timeframe:
        if( LastBarCountMain != NumberOfMainBars )
                {
                LastBarCountMain = NumberOfMainBars;
                TradeTimeframe_Proc();//For calculations that run at chart TradeTimeframe interval
                }
//
        // In addition we also need to do some processing at shorter interval:
        if( LastBarCountFast != NumberOfFastBars )
                {
                LastBarCountFast = NumberOfFastBars;
                Fast_Proc();//For calculations that need shorter interval, primarily Trailing Stop
                }
//
        //This is for debugging, will run at tick interval:
        if( !MQLInfoInteger(MQL_TESTER) || ShowMetrics )
                {
                DebugDataToScreen();//Debug
                }
        }
//******************** End OnTick() *****************************************************************************************
The Fundamentals of Testing in MetaTrader 5
The Fundamentals of Testing in MetaTrader 5
  • www.mql5.com
What are the differences between the three modes of testing in MetaTrader 5, and what should be particularly looked for? How does the testing of an EA, trading simultaneously on multiple instruments, take place? When and how are the indicator values calculated during testing, and how are the events handled? How to synchronize the bars from different instruments during testing in an "open prices only" mode? This article aims to provide answers to these and many other questions.