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

 
Romal001:
A smart person who understands this would have answered the question. They would not say it was an unintelligent question because of a lack of knowledge and information. (Simply put, we are good at pouring things into empty space) Peace.

That's how you overflow. Whatever the question, that's the answer.

Please tell me what to do in this situation:

a=8; c=7; // ?????

It is only useful for everyone to answer.

 
Artyom Trishkin:

That's how you overflow. Whatever the question, that's the answer.

Please tell me what to do in this situation:

a=8; c=7; // ?????

Just a useful answer for everyone.

May I answer, please!

In your case you could replace a=7; c=8.

I assure you it will be 100 times better. You could also enter a variable "c" , and set it to c=7.5;

Note how much I have given a quality and useful answer)

 
Artyom Trishkin:

That's how you overflow. Whatever the question, that's the answer.

Please tell me what to do in this situation:

a=8; c=7; // ?????

Only useful for everyone to answer.


double Dopen1 = iOpen(NULL,TimeFr,1);
   double Dclose1 = iClose(NULL,TimeFr,1);
   double Dopen2 = iOpen(NULL,TimeFr,2);
   double Dclose2 = iClose(NULL,TimeFr,2);
   double Dopen3 = iOpen(NULL,TimeFr,3);
   double Dclose3 = iLow(NULL,TimeFr,3);

   Dmax=iHigh(NULL,TimeFr,1); // high прошлой свечи
   Dmin=iLow(NULL,TimeFr,1); // low прошлой свечи
   TempT=iTime(NULL,TimeFr,1); // время прошлой свечи
I kept asking about this caddy, what can I add, what can I change, the answer wassalt, pepper. You could also add sauce of some kind.

You can alsoread here- a lot of useful stuff.


 
Romal001:

I asked about this caddy, what can be added and what can be changed, the answer was toadd salt and pepper. You could also add sauce of some kind.

You can alsoread a lot of useful informationhere.


There are no words, or rather there are, but very few, and most of them are uncensored, so I decided not to use them.

 
Romal001:

I was asking about this caddy and the answer wassalt and pepper. You could also add sauce of some kind.

You can alsoread here- a lot of useful information.


Add comments to the top six lines - because it's not good - lines 7,8,9 have comments, and line 1 - 6 have none.
 
Vitaly Muzichenko:

There are no words, or rather there are, but very few, and most of them are uncensored, so I decided not to use them.


Thank you for your time and attention) It was nice to talk to "the best of the best minds" on this forum. The matter is closed.
 
Vitaly Muzichenko:
Artyom Trishkin:
Trollers:) You'd better advise to get prices in a loop. Accordingly, store them in arrays.
 
Alexey Kozitsyn:
Trollers:) A better suggestion would be to get the prices in a loop. Accordingly, store them in arrays.
You can also advise to wrap everything into a class. You can give a lot of advice without knowing what the questioner needs.
 
Artyom Trishkin:
You could also advise wrapping everything up in a class. You can give a lot of advice without knowing what the questioner needs.
Well... I don't think you need to dig that deep, but the request in the loop is really the first thing that catches your eye.
 
Victor Nikolaev:   A small script
      int tmp=n;
      int a=MathMod(tmp,3);
      tmp=(tmp-a)/3;
      int b=MathMod(tmp,3);
      tmp=(tmp-b)/3;
      int c=MathMod(tmp,2);
      tmp=(tmp-c)/2;
      int d=tmp;

In my opinion, it is simpler like this

//+-------------------------------------------------------+
//| Перебор                                      PROBA.mq4|
//+-------------------------------------------------------+
#property strict

//+-------------------------------------------------------+
//| Программа скрипта                                     |
//+-------------------------------------------------------+
void OnStart()
{
   Alert("Номер     A       B       C       D");   // Нижний заголовок
   int n=0;  // Счетчик

   for (int D=16; D<=48; D+=4)   //                      D меняется от 16 до 48 шаг 4
   for (int C=0;  C<=1;  C++)    // Для каждого значения D меняется C от 0 до 1 шаг 1
   for (int B=1;  B<=3;  B++ )   // Для каждого значения C меняется B от 1 до 3 шаг 1
   for (int A=2;  A<=6;  A+=2, n++)// Для каждого знач-я B меняется A от 2 до 6 шаг 1
   Alert("    ", n, "     ",A, "       ",B, "       ",C, "      ",D);   // Разделил пробелами. Можно точнее выровнить

   Alert("Номер     A       B       C       D");    // Верхний заголовок
}

Alert outputs immediately to the screen. This is the end of the table.

Reason: