Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 395

 
iv1986:

I'm not sure if there is a program for combining testing reports similar to reportmanager for mt5,reportmanager doesn't open them.

QuantAnalyzer, used to be called EA Analyzer.

 
mila.com:

Hello.

Please help me to colour a zigzag.

I want to make it so that if the distance from the trough to the top is >=100 points, to colour the segment green.

Can't I colour the individual zigzags?

How do I measure these distances from tops to troughs in the history?
 
mila.com:

Can't you colour in individual sections?

How do you even measure these vertex-to-trough distances in the story?

You can do anything you like. With a few exceptions.

I recently had to work with such a ZZ,

would it work? The figures show the number of points between extrema in the old mode with an accuracy of 0.1 and the number of bars between the extrema.

And to color ZZ it has to be completely rewritten. Who needs it?

 

Hello! How to assign a name to a string variable depending on the parameters passed:

void function_xy(..., ..., string x, string y)
{
...
string object_xy;//вместо x и y должны стоять передаваемые параметры
...
}

For example,

void function_23(..., ..., int 2, int 3)
{
...
string object_23
...
}

Or

void function_af(..., ..., string a, string f)
{
...
string object_af;
...
}

???

 
Timur1988:

Hello! How to assign a name to a string variable depending on the parameters passed:

For example,

Or

???

void function_xy(..., ..., string x, string y)
{
...
string name = "object_" + x + y;//вместо x и y будут стоять передаваемые параметры
...
}
 
Timur1988:

Hello! How to assign a name to a string variable depending on the parameters passed:

For example,

Or

???

1.
void function_xy(..., ..., string x, string y)
{
...
string object_name="obj_name_"+x+"_"+y; //вместо x и y должны стоять передаваемые параметры
...
}

2.

void function_23(..., ..., int x, int y)
{
...
string object_name="obj_name_"+(string)x+"_"+(string)y;
...
}
 
Alexey Viktorov:
:) Ahead of you...
 
Artyom Trishkin:
1.

2.


Alexey Viktorov:

How will the Expert Advisor understand what is what in this case?

#include <function_xy.mqh>
#include <function_wz.mqh>

extern string sym1="x", sym2="y", sym3="w", sym3="w";

int init()
{
...
}

int start()
{
...
function_xy(..., ..., x, y);
function_wz(..., ..., w, z);
...
}

int deinit()
{
...
}

_______________

void function_xy(..., ..., string x, string y)
{
...
string name = "object_" + x + y;
...
} 

_______________

void function_wz(..., ..., string w, string z)
{
...
string name = "object_" + w + z;
...
} 

That is, how will the Expert Advisor then distinguish between variables with the same name? I understand that after function_wz() has returned control to the main program, then the value of variable name = "object_"+w+z. I can't figure it out, help me out please!

 
Timur1988:


And how will the expert understand what is what in this case:

_______________

_______________

That is, how will the Expert Advisor distinguish between variables with the same name? I understand that after function_wz() has returned control to the main program, then the value of variable name = "object_"+w+z. I can't understand it, help me out please!

Do not confuse variable string x; and string character "x".

I didn't understand a particular task. Thus, there is no particular answer.

Maybe it would be better to think about function overloading?
 

Good afternoon all,


Is there any code to open a single trade with error checks? Exactly for real, not for a test... Can as a function, just a deadlock :(

Reason: