Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 1040

 
LRA:

Ekburg!!! All warnings should be eliminated. The first warning means that the statement has no effect - discarded by the compiler - that's bad. The last warning means that the size of a local variable (array) exceeds 512kB and therefore has no effect - that's too bad. The rest of the warnings - an uninitialized variable might be used. It's like when you forget to put money on the card and try to spend it. We have to check all the branches of the program. Sometimes the compiler is over-insured. In this case you should declare it this way: int x=0; string y=""; bool z=false;

first and last warning eliminated.

ok, got it, will try)

 
LRA:

Ekburg!!! All warnings should be eliminated. The first warning means that the operator has no effect - discarded by the compiler - this is bad. The last warning is that the size of the local variable (array) exceeds 512kB and therefore has no effect - that's too bad. The rest of the warnings - an uninitialized variable might be used. It's like when you forget to put money on the card and try to spend it. We have to check all the branches of the program. Sometimes the compiler is over-insured. In this case you should declare it this way: int x=0; string y=""; bool z=false;

I assigned zeros to the variables during initialization, the warnings disappeared, but what about arrays?

And it is not at the place of its declaration, but where it is used at the end, where is the output from the array via the print function.

 
Ekburg:

I assigned zeros to the variables during initialization, the warnings disappeared, but what about arrays?

And it's not where it's declared, it's where it's used at the end, where the output from the array is via the print function.

Print not by one but by two or three printers... or better in a loop, the variable is formed very large...
 
Tecuciztecatl:
output two or three prints instead of just one... or better in a loop, the variable is formed very large...

I already do it by looping...(

for(int z=0;z<6;z++)
      {
      Print("О!!!   ",z,"   Кол-во  = ",Info[z][0],"; Кол-во B = ",Info[z][1],"; Кол-во S = ",Info[z][2],"; Максимальное отклонение = ",Info[z][3],"; Среднее отклонение = ",Info[z][4]);
      Print("B!!!   ",z,"   Кол-во + = ",BI[z][0],"; Кол-во - = ",BI[z][1],"; Общий объём = ",BI[z][2],"; Средний объём = ",BI[z][3],"; Мах просадка = ",BI[z][4],"; Средняя просадка = ",BI[z][5]);
      Print("S!!!   ",z,"   Кол-во + = ",SI[z][0],"; Кол-во - = ",SI[z][1],"; Общий объём = ",SI[z][2],"; Средний объём = ",SI[z][3],"; Мах просадка = ",SI[z][4],"; Средняя просадка = ",SI[z][5]);
      }

I've highlighted in red where the compiler is referencing.

 

split each print into 2-3 prints... although it's strange... what are the data types in the array?

tried it this way, it works:

double Info[6][6],BI[6][6],SI[6][6];

for(int z=0;z<6;z++)
      {
      Print("О!!!   ",z,"   Кол-во  = ",Info[z][0],"; Кол-во B = ",Info[z][1],"; Кол-во S = ",Info[z][2],"; Максимальное отклонение = ",Info[z][3],"; Среднее отклонение = ",Info[z][4]);
      Print("B!!!   ",z,"   Кол-во + = ",BI[z][0],"; Кол-во - = ",BI[z][1],"; Общий объём = ",BI[z][2],"; Средний объём = ",BI[z][3],"; Мах просадка = ",BI[z][4],"; Средняя просадка = ",BI[z][5]);
      Print("S!!!   ",z,"   Кол-во + = ",SI[z][0],"; Кол-во - = ",SI[z][1],"; Общий объём = ",SI[z][2],"; Средний объём = ",SI[z][3],"; Мах просадка = ",SI[z][4],"; Средняя просадка = ",SI[z][5]);
      }
 
Ekburg: by looping the output...
Show the array declaration and explain why this is the case. Why two-dimensional, why this size, how many elements are actually used, what is the margin and for what.
 
LRA:
Please show the array declaration and explain why this is so. Why two-dimensional, why this size, how many elements are actually used, what is the margin and for what.

   double Info[6][5];
   double BI[6][7];
   double SI[6][7];

They are declared at the beginning of the script, then gradually filled in with the execution of the code.

Maybe the problem is that some calculations produce values with lots of zeros? Maybe they need to be normalized?

 

Guys, here's a tip. The indicator calls other indicators. How to make the execution of the main indicator functions only after all values are loaded from other indicators. Slip in indicator does not work, what to do???? How to check that the data from other indicators is loaded and you can start the calculation????

Because when compiling during the appearance of the next bar is jumping, some data are taken for an old bar, some for a new one, taking into account that I use different symbols, it turns out that some of the symbol is not updated, and the data comes for the previous bar. How to synchronize that all symbols have a new bar and can make calculations?

 
Hello professionals, unfortunately no one has answered me, What changes need to be made to the code to produce the same results, but two bars earlier? Or is this impossible?
 
rapid_minus:
Hello, masters, professionals. Unfortunately, no one gave me an answer. What changes do I need to make in the code to produce the same results, but two bars earlier? Or is this impossible?

Two bars earlier, there will be a redraw, i.e. now there is a symbol, tomorrow it won't be where it was. Looking into the future is not welcome.... It will not help.

Usually this is solved by adding i+2 to the index; it's like this....

Reason: