New MetaTrader 5 platform build 1930: Floating window charts and .Net libraries in MQL5 - page 7

 
JC:

... And now we're on to build 1935. Still does not fix my example above. I suspect the focus is on removing problems with code newly compiled for the current build, not on handling edge cases in old compiled code.

... and still present in 1936.

 

Since build 1930 that my broker forced upon me (I'm on 1932 now), some indicators I wrote now use high amounts of CPU and cause the terminal to lock up.  The culprit appears to be the Bars() function.  At times, it will run for an extended period of time, and return a zero, when there are not zero bars on the supplied timeframe.  Any idea what the problem is?  Is there a workaround?

 
AaronJStuart:

Since build 1930 that my broker forced upon me (I'm on 1932 now), some indicators I wrote now use high amounts of CPU and cause the terminal to lock up.  The culprit appears to be the Bars() function.  At times, it will run for an extended period of time, and return a zero, when there are not zero bars on the supplied timeframe.  Any idea what the problem is?  Is there a workaround?

hi all, i have same problem, terminal go to sleep on 30 seconds on function Bars();

Before is worked correct  on build 1930 and low.

 
Stanislav Korotky:

You may find some useful info here - How do I prevent auto updates? Or create fallback-points.

Cool.  Thanks for the info.
 
Sergey Holubko:

hi all, i have same problem, terminal go to sleep on 30 seconds on function Bars();

Before is worked correct  on build 1930 and low.

AaronJStuart:

Since build 1930 that my broker forced upon me (I'm on 1932 now), some indicators I wrote now use high amounts of CPU and cause the terminal to lock up.  The culprit appears to be the Bars() function.  At times, it will run for an extended period of time, and return a zero, when there are not zero bars on the supplied timeframe.  Any idea what the problem is?  Is there a workaround?

Try Update to the new version (build 1940)

I currently have 1936 and 1940, they both seems very good for me. Memory leak problems issues fixed on 1934. 

 

Forum on trading, automated trading systems and testing trading strategies

Glitches in the program

Vladimir Karputov , 2018.11.04 06:04

I upgraded to beta 1940 and there seems to be no more memory devouring (at least I haven’t noticed yet).

Trading, Automated Trading System and Test Trading Strategy Forum

Failure in the program

Alexey Volchanskiy, 2011.01.04 11:37

Built in 1940, open 5 charts, each with a scalp and 30-50 MB.

 
Print(SymbolInfoString(_Symbol,SYMBOL_FORMULA));

Returns an empty string while testing in the Strategy Tester.

 

Hi everyone,

Hope you are all fine. Since the latest MT5 update I am experiencing random access violation errors when executing indicators and EAs, compiled after or before the update.

These errors did not happen before the update and I was no able to narrow it down to a single function call. After some complexity in the code, it just happens randomly. Sometimes it does, someties it does not.

Just my feedback for Metaquoe, hoping whatever caused it can be fixed for next update.

Thanks.
 

Hello MetaQuotes,

I still getting  crashes with the build 1940.

This situation is stopping my EAs.


As @Arturo Lopez Perez says, this new MT5 uppdate is crashing due to random acces violation errors. I searched in all my code for any explication, but I'm can't reproduce the error.

In my real EAs I can force the error just opening the EA, waiting some seconds, opend properties, changing any parameter and OK. When the EA restart I get the crash.

I created this small EA with the most important steps that my EAs are doing (this code doesn't causes the error, but is close):


#property copyright  "Copyright 2018"
#property version    "1.00"

#define EA_NAME      "My EA Test"
#define EA_VERSION   "1.00.1"

input int ParameterA = 0;
input int ParameterB = 0;

// Symple Class One
class ClassOne
{
   private: 
      string   m_Text;
      string   m_TextArray[];
      
   public: 
                  ClassOne(){};
                  ~ClassOne(){};
      void Init(string msg)
      {
         m_Text = msg;
         Print(m_Text);                            // This causes crash.
         StringSplit(m_Text,'\n', m_TextArray);    // This causes crash too.
      }
};

ClassOne ObjectOne;

// Symple Class Two
class ClassTwo
{
   private: 
      
   public: 
      ClassTwo()
      {
         string EaDescription = EA_NAME + " V" + EA_VERSION;
         ObjectOne.Init(EaDescription);
      };
      ~ClassTwo(){};
};

ClassTwo ObjectTwo;

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
{
   Print("Testing MT5 new versions");
   Print("This EA was compilated in  MT5 build 1881");
   
   string EaDescription = EA_NAME + " V" + EA_VERSION;
   
   ObjectOne.Init(EaDescription);
   
   return(INIT_SUCCEEDED);
}


Is important to say, I'm using some defines:

#define EA_NAME      "My EA Test"
#define EA_VERSION   "1.00.1"


I'm working with these defines to compose the description of the EA, after that any one of these codes causes the crash:

Print(m_Text);                            // This causes crash.
StringSplit(m_Text,'\n', m_TextArray);    // This causes crash too.


I think this error is similar to @JC posted: https://www.mql5.com/en/forum/285632/page5#comment_9174927

New MetaTrader 5 platform build 1930: Floating window charts and .Net libraries in MQL5
New MetaTrader 5 platform build 1930: Floating window charts and .Net libraries in MQL5
  • 2018.10.29
  • www.mql5.com
The updated version of the MetaTrader 5 platform will be released on October 26, 2018...
Reason: