Important Update for MetaTrader 4 build 1080 - page 2

 
Eleni Anna Branou:


Many brokers are not upgrading their MT4 terminals to every new upgrade. They wait and upgrade when there is a more stable version.

My broker has not upgraded to 1074 too, probably will upgrade straight to 1080 version, that corrects the Windows upgrade problem.

1074 was never an official release, no broker used this build.

Anyway, all this update system is a mess for professional coders.

 

Hey all,

I don't understand what's wrong if is the new update or my code.

I am getting error:

'TempArray' - structures containing objects are not allowed

'Arr' - structures containing objects are not allowed

in this code, that has always compiled before the update.

void DeleteElementInArray(Holder *&Arr[],int index)
  {
   delete Arr[index];
   if(ArraySize(Arr)==0)
     {
      ArrayFree(Arr);
      ArrayResize(Arr,0);
     }
   else if(index==0)
     {
      Holder *TempArray[];
      ArrayCopy(TempArray,Arr,0,1);
      ArrayFree(Arr);
      ArrayCopy(Arr,TempArray,0,0);
     }
   else
     {
      Holder *TempArray[];
      ArrayCopy(TempArray,Arr,0,0,index);
      ArrayCopy(TempArray,Arr,index,(index+1));
      ArrayFree(Arr);
      ArrayCopy(Arr,TempArray,0,0);
     }
  }


Do we have to change anything? Why is that happening?

 
Alain Verleyen:

1074 was never an official release, no broker used this build.

Anyway, all this update system is a mess for professional coders.


Ah, I see Alain, that explains it. Thanks!
 
Savoiardo:

Hey all,

I don't understand what's wrong if is the new update or my code.

I am getting error:

'TempArray' - structures containing objects are not allowed

'Arr' - structures containing objects are not allowed

in this code, that has always compiled before the update.


Do we have to change anything? Why is that happening?

Use custom ArrayCopy for void* Array[].

template <typename T>
int ArrayCopy( T &Dst_Array[], const T &Src_Array[], const int Dst_Start = 0, const int Src_Start = 0, const int Count = WHOLE_ARRAY );
 

CRASH!!!

These codes will crash the whole MT4 v.1080 when strategy testing, it worked fine before the last one update.

struct _COLOR2RGB;

struct _RGB2COLOR
{ 
private:

        void oequ( _RGB2COLOR &rc, _COLOR2RGB &cr )
        {
                rc = cr;
        }

public:

        color c; 

        color operator=( _COLOR2RGB &c );

        _RGB2COLOR operator=( color co )
        {
                c = co;

                return this;
        }
};

struct _COLOR2RGB
{
private:

        void oequ( _COLOR2RGB &cr, _RGB2COLOR &rc )
        {
                cr = rc;
        }

public:

        uchar b;
        uchar g;
        uchar r;
        uchar a;

        _COLOR2RGB operator=( _RGB2COLOR &rc )
        {
                oequ( this, rc );
                //this = /*( _COLOR2RGB )*/ rc;

                return this;
        }

        _COLOR2RGB operator=( color c )
        {
                _RGB2COLOR rc;

                rc.c = c;
                oequ( this, rc );
                //this = /*( _COLOR2RGB )*/ rc;

                return this;
        }
};

color _RGB2COLOR::operator=( _COLOR2RGB &cr )
{
        oequ( this, cr );
        //this = /*( _RGB2COLOR )*/ cr;

        return c;
}
 

Forum on trading, automated trading systems and testing trading strategies

Important Update for MetaTrader 4 build 1080

Googol Lien, 2017.05.14 22:17

CRASH!!!

These codes will crash the whole MT4 v.1080 when strategy testing, it worked fine before the last one update.

struct _COLOR2RGB;

struct _RGB2COLOR
{ 
private:

        void oequ( _RGB2COLOR &rc, _COLOR2RGB &cr )
        {
                rc = cr;
        }

public:

        color c; 

        color operator=( _COLOR2RGB &c );

        _RGB2COLOR operator=( color co )
        {
                c = co;

                return this;
        }
};

struct _COLOR2RGB
{
private:

        void oequ( _COLOR2RGB &cr, _RGB2COLOR &rc )
        {
                cr = rc;
        }

public:

        uchar b;
        uchar g;
        uchar r;
        uchar a;

        _COLOR2RGB operator=( _RGB2COLOR &rc )
        {
                oequ( this, rc );
                //this = /*( _COLOR2RGB )*/ rc;

                return this;
        }

        _COLOR2RGB operator=( color c )
        {
                _RGB2COLOR rc;

                rc.c = c;
                oequ( this, rc );
                //this = /*( _COLOR2RGB )*/ rc;

                return this;
        }
};

color _RGB2COLOR::operator=( _COLOR2RGB &cr )
{
        oequ( this, cr );
        //this = /*( _RGB2COLOR )*/ cr;

        return c;
}
Recursive infinite loop.
 

The FuzzyNet library dont work anymore, when i try to compile a program with FuzzyNet the Metaeditor gives me 37 Errors like this one from RuleParser.mqh:

 

 //+------------------------------------------------------------------+
   //| Build lexems list                                                |
   //+------------------------------------------------------------------+
private:
   static CList *BuildLexemsList(CList *in,CList *out)
     {
      CList *lexems=new CList();
      for(int i=0;i<ArraySize(KEYWORDS); i++)
        {
         string keyword=KEYWORDS[i];
         KeywordLexem *keywordLexem=new KeywordLexem(keyword);
         Dictionary_String_Obj *p_so=new Dictionary_String_Obj;
         p_so.SetAll(keywordLexem.Text(),keywordLexem);
         lexems.Add(p_so);
        }
      for(int i=0; i<in.Total(); i++)
        {
         INamedVariable *var=in.GetNodeAtIndex(i);
         BuildLexemsList(var,true,lexems);
        }
      for(int i=0; i<out.Total(); i++)
        {
         INamedVariable *var=out.GetNodeAtIndex(i);
         BuildLexemsList(var,false,lexems);
        }
      //--- return lexems
      return (lexems);
     }

i- variable already defined

for me the code is ok, cant identify any error.

 
sfonti:

The FuzzyNet library dont work anymore, when i try to compile a program with FuzzyNet the Metaeditor gives me 37 Errors like this one from RuleParser.mqh:

 

i- variable already defined

for me the code is ok, cant identify any error.

#property strict
 
fxsaber:

Use custom ArrayCopy for void* Array[].

Thanks, it worked.

Maybe i'll go a little off topic here, but can't understand why it worked, i've never seen a function declaration without body..

Does it override the function parameters without changing the body of the function?

 
Savoiardo:

Thanks, it worked.

Maybe i'll go a little off topic here, but can't understand why it worked, i've never seen a function declaration without body..

Does it override the function parameters without changing the body of the function?

Write the body of the function you want.