[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 353

 
granit77 писал(а) >>

Just yourself. It is the author's privilege to write something and then tastefully fish out the fleas.

In these cases, I remix the finished constructs in blocks and see if the error disappears. Programmers use third party editors with bracket checking. Someone will give me the link now, I can't remember.

Catching fleas is exciting. While you're catching one, you're reworking the logic. I've caught a lot in my block, but this flea's been bugging me for three weeks now. I remember with melancholy when I had to write for 1-C accounting. There's a debugger - run a non-working program and one line at a time browsing the contents of any copied - the dream!

And remirating blocks gives a lot of undefined variables

 
Vekker писал(а) >>

Catching fleas is exciting. As long as you catch one, you're still reworking your logic. I have caught many in my unit, but this flea is now in its third week. I remember with melancholy when I had to write for 1-C accounting. There's a debugger - run a non-working program and one line at a time browsing the contents of any copied - the dream!

And remirating blocks gives a lot of undefined variables

Upload it. Either here or in person. >> I'll look for bugs.

 
DDFedor >> :

https://www.mql5.com/ru/forum/120538

there are two solutions...

- make backups and then compare (you should ALWAYS do them. That's the first thing to learn).

- Second, see the link to editors which can catch bracket pairing. ( notepad, I think... )

zy... if neither, comment the blocks until the error disappears. then successively include the commented blocks.

... "divide and conquer"...

Who does - I always add "if() {}" to all brackets when creating something with brackets, and then write inside what I have planned.

I don't remember such mistakes :)

 
Vekker >> :

When compiling what I've written, there is an ETERNAL ! error '\end_of_program' - unbalanced left parenthesis.

Checked AND REPEATED all the brackets, but found nothing.

I get this error very rarely. Because I try to put paired brackets, e.g. curly brackets, right away before inserting anything into them. And I often run compilation, so that if anything, an error message appears.


And then if the listing is formatted indented, the pairing of braces can be found by placing the cursor to the beginning of the line at the end of which is an opening and moving down (clicking on the down arrow) to close it. If you find that the closing bracket is to the left of the cursor, there is clearly something missing.

 

Hello.

Please tell me how to copy double buf[] to double bufer [0] []

Array Copy provides for copying one dimensional arrays

I have tried it this way.

  if( Считать_ВсЕ_Бары){ pos = Bars-IndicatorCounted() ; }
    else{ pos = WindowBarsPerChart()*3 ; } 
  int per[8]={36,49,64,144,169,196,400,625};

for(int k=0; k<8; k++)
   while( pos >= 0) 
     {
       buf[ k][ pos] = iMA(NULL, T , per[ k], 0, Метод_Вычисления_МА, 4, pos);
       pos--;
     }
for( k=0; k< pos; k++)
 ma1_buffer[ pos]= buf[0][ pos];
didn't work.

Thanks in advance.

ArrayCopy( object &dest[], object source[], int start_dest=0, int start_source=0, int count=WHOLE_ARRAY)
 
costy_ писал(а) >>

Hello.

Please tell me how to copy double buf[] to double bufer [0] []

Array Copy provides for copying one dimensional arrays

I have tried it this way.

it didn't work.

Thanks in advance.

ArrayCopy( object &dest[], object source[], int start_dest=0, int start_source=0, int count=WHOLE_ARRAY)

after the for loop you should put initial value for the pos

 
vasya_vasya >> :

After the for loop you have to put the initial value for the pos

Thanks, are there no other methods other than element-by-element assignments?

int pos = WindowBarsPerChart()*3 ;
double sd[][];
   while( pos >= 0) 
     {
       sd[0][ pos] = iMA(NULL, T , Period_1, 0, Метод_Вычисления_МА, 4, pos);
       pos--;
     }
Alert( sd[0][0]);

Why does the alert give 0 !?

 
costy_ писал(а) >>

Thanks, are there no other methods other than element-by-element assignments?

Why does the alert give 0 !

Because you have to resize the array, otherwise you won't get anything written to it.

 
Vekker >> :

change is poisoning my life

niz=(Low[j];
use

 
vasya_vasya >> :

because you have to resize the array, otherwise you won't be able to write anything to it.

So why resize if you don't specify the number of buffer cells, it's max!?