Errors, bugs, questions - page 83

 

That's it. Disconnected!

2010.08.06 13:12:00 Core 1 Disconnected

9 minutes (CPU speed 50%)

Too long(

 
gumgum:

That's it. Disconnected!

2010.08.06 13:12:00 Core 1 Disconnected

9 minutes (CPU speed 50%)

Long(


Thank God for that :o)

Couldn't finish the computation at all.

Look for the positive in everything.

 
Urain:
Thank goodness :o)

And if there are three currency pairs, it's scary to even think about. :)

If only there were a choice of history to be loaded, and a pause button during optimisation...

 
gumgum:
And if there are three currency pairs, it's scary to even think about. :)
Let the computer think, it has an iron head.
 
gumgum:
And if you have three currency pairs, it's scary to even think about. :)
gumgum:

That's it. Disconnected!

2010.08.06 13:12:00 Core 1 Disconnected

9 min (CPU speed 50%).

Long time(


It will only load history once for each pair.

Then only clean test.

Here, try running the test again. The idea is that it should fit in 2-3 minutes...

 
Urain:
Let the computer think, it has an iron head.
Why set the timeframe in the tester to one month, if you only want to test three months? Still, it is better to think.
 
Rosh:
Why put a monthly timeframe in the tester if you only want to test three months? Still, it's better to think.
I need the history until a certain date.
 
Rosh:
We'd better think about it though.

So how about parameter passing to constructor, anyone got a solution ?

SZ the problem seems to me to be that nested constructor is called before external, solution for that would be a delayed call operator to break the default order. There could be confusion with destruct.

ZZZY though if the objects are destroyed by handle numbers then there won't be a problem.

 
Urain:

So how about parameter passing to constructor, anyone got a solution ?

SZ the problem seems to me to be that nested constructor is called before external, solution for that would be a delayed call operator to break the default order. Although there could be confusion with destruct.

The article titled " Object Creation and Destruction in MQL5 " was written to answer such questions. Insert Print in the constructor and you will see everything (call queue)
 
Urain:

Dear colleagues and language developers, could you please explain the following situation?

There are two structures (senior and junior), the constructor of senior is called by start(),

constructor of junior is called by constructor of senior structure.

How to pass a variable from senior structure to constructor of junior structure ??????????


O Lord, I've written this, but I don't even understand what I've written.

//Struct Ml
struct Ml
{
//----------------------------------------------------------------------------//
int a;
int b;
//----------------------------------------------------------------------------//
//Constructor
  void Create(bool f,bool F)
  {
  if(f) a=1; else a=2;
  if(F) b=2; else b=3;
  };
//Destructor
void ~Ml(){};

void m(){};
//----------------------------------------------------------------------------//
};
//****************************************************************************//
//Struct St
struct St
{
//----------------------------------------------------------------------------//
bool f;
bool F;
//----------------------------------------------------------------------------//
Ml x[];
//Constructor
  void St()
  {
  f=true; F=false;
  ArrayResize(x,1);
  x[0].Create(f,F);
  x[0].m();
  };
//Destructor
void ~St(){};
//mult
  int mult(int i)
  {
  ArrayResize(x,i+1);
  x[i].Create(f,F);
  return(x[i].a*x[0].b);
  };
//add
  int add(int i)
  {
  ArrayResize(x,i+1);
  x[i].Create(f,F);
  return(x[i].a+x[0].b);
  };
};

The way I understand it is to call it like this

//----------------------------------------------------------------------------//
//Work variables
St x[];
//----------------------------------------------------------------------------//
ArrayResize(x,2);

int Mult=x[1].mult(10);
int Add=x[1].add(10);

Print("x[1].mult(10)=",x[1].mult(10),"  x[1].add(10)=",x[1].add(10));

//----------------------------------------------------------------------------//
Reason: