Questions from a "dummy" - page 58

 
Please advise how to get the basic knowledge of mql for strategy testing and automated trading. Maybe there are some courses or video lessons?
 
spoiltboy:
Please advise how to get the basic knowledge of mql for strategy testing and automated trading. Maybe there are some courses or video lessons?
Start with the Articles section and look at the CodeBase source code at the same time.
 
spoiltboy:
Please advise how to get the basic knowledge of mql for strategy testing and automated trading. Maybe there are some courses or video lessons?
Have a look at last year's articles on "For Beginners". There are several articles with examples and explanations. Then, as your appetite and curiosity grows.
 

The manual states:

Промежуточные тики

Intermediate ticks between reference points are generated according to the following rules:

  • If the number of ticks is greater than the number of points between the reference points, a "sawtooth" (initial value +/- 1) is generated.
  • If there are enough points between the anchor points, a linear sequence of ticks is generated.

Does the phrase "initial value +/- 1" indicate that there is an element of randomness in the formation of the "saw"? That is, that in one pass this "saw" will be generated with an initial value of "+1", and in another pass with an initial value of "-1". Or does the sign of the initial value depend on some additional rigid conditions, and within the framework of concrete optimization procedure the sign of the initial value will be the same?

 
Yedelkin:

The manual says:

Does the phrase "initial value +/- 1" indicate that there is an element of randomness in the formation of the "saw"? I.e. that in one pass this "saw" will be formed with an initial value of "+1", and in another pass it will be formed with an initial value of "-1". Or does the sign of the initial value depend on some additional rigid conditions, and within the framework of concrete optimization procedure the sign of the initial value will be the same?

A saw is generated randomly, but always rigidly by internal conditions.

That is, all passes generate the same ticks. Otherwise, the passes would produce different results.

 
Renat:

The saw is generated randomly, but always rigidly by internal conditions.

That is, all passes generate the same ticks. Otherwise the passes would give different results.

OK, I get it: in optimization mode all passes generate the same ticks. Most likely, it's the same in test mode too...

...I just get different results in test mode with the same set of parameters, that's why I've been looking for the reason for the second month.

 

Greetings!

maxPos =SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_LIMIT);

On my contest it shows 15. On my real 0. Is it to understand that there is no limit on the volume of the position?

Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства позиций
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства позиций
  • www.mql5.com
Стандартные константы, перечисления и структуры / Торговые константы / Свойства позиций - Документация по MQL5
 
Karlson:

Greetings!

On my contest it shows 15. On my real 0. Is it to understand that there is no limit on the volume of the position?

Yes
 

Many such buffers need to be declared and subsequently handled:

// при глобальном объявлении:
double Buffer1[];
double Buffer2[];
...
double BufferN[];


// в OnInit():
SetIndexBuffer(0,Buffer1,INDICATOR_DATA);
SetIndexBuffer(1,Buffer2,INDICATOR_DATA);
...
SetIndexBuffer(N-1,BufferN,INDICATOR_DATA);


// в OnCalculate():
for(i...)
{
        Buffer1[i] = ...;
        Buffer2[i] = ...;
        ...
        BufferN[i] = ...;
}

Is there any way to wrap these creepy full-screen stripes of blocks each somehow compactly into loops? Need to create an array of arrays? Enumerations? Use structures? Pointers to objects? Something I don't know enough for that yet. In some languages I can rivet variable names, declare them and create string expressions with eval(), but I haven't found anything similar here. Can you give me a hint?

Thank you.

 
x100intraday:

Is there any way to wrap these creepy full-screen blocks into loops somehow compactly?

Two-dimensional arrays like array[][] won't work?
Reason: