[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 357

 

thank you, so far nothing "usual" for me at all)))))))

 
Zhunko:
Maybe you should use the magic SRC button.


"Guri, where's the button?"

I did, then, when I was editing. I just forgot at first and you've already read the post - very quick. Thank you.

 
Figar0:

This is unlikely to help). This indicator is an add-on to several other custom indicators, the error could be anywhere.
The "custom" indicators are....?????
Could you give me an example of what kind of errors could be causing the terminal to freeze?
 
splxgf:
Am I the only one confused by this construction?


I'm sorry, the forum rules for newbies say that when asking a question, it's better to write that done so-and-so...., but it didn't work.

It would be nice if the pros would write "am I the only one who is confused by this design? and I would do so-and-so and so-and-so....".

I understand that all people are busy and serious and don't want to spend money on trivialities, but in this case the answer would be complete.

Thank you.

 
LOA:


Sorry, forum rules for newbies say that when asking a question, it's better to write that done so-and-so...., but it didn't work.

It would be nice if the pros would write "am I the only one who is confused by this design? and I would do so-and-so and so-and-so....".

I understand that all people are busy and serious and don't want to spend money on trivialities, but in this case the answer would be complete.

Thanks.

   for (i = Counted_bars-1; i>=0;i++)

Let's assume that Counted_bars is greater than 1 (it also happens, agree), e.g. 10.

Then initially you have i = 9. Condition i>=0 is checked, it is true. The loop body is executed and i is incremented by 1. It will become 10. It is naturally greater than zero and the loop repeats itself again. i = 11, 12, 13... and so on until it overflows (or another error occurs)

 
ilunga:

Let's assume that Counted_bars is greater than 1 (it also happens, agree), e.g. 10.

Then initially you have i = 9. Condition i>=0 is checked, it is true. The loop body is executed and i is incremented by 1. It will become 10. It is naturally greater than zero and the loop repeats itself again. i = 11, 12, 13... and so on until it overflows (or another error occurs)


OK. Thanks, got it. i++, change it to i--. Right?
 
LOA:

OKAY. Thanks, got it. i++, change it to i--. Right?

so

glancing over the rest, but I recommend reading the article https://www.mql5.com/ru/articles/1561 before your next questions

and look carefully at conditions like

double proboy_5_UP = ...
if (proboy_5_UP==1)
 
LOA:

OK. Thanks, got it. i++, change it to i--. Right?
Right. The main thing is that next time this output will take less time.
 
ilunga:

so

the rest is glimpsed, but I recommend reading the article https://www.mql5.com/ru/articles/1561 before your next questions

and look carefully at conditions like


Thank you, I'll fix it.

if (proboy_5_UP==1){

replaced by.

if (proboy_5_UP>0){

Is that right?
 
splxgf:
Right. The main thing is to take less time to reach that conclusion next time.

Totally agree with you, that's why I wrote:

"I wish the pros would write "I WOULD have done so-and-so and so-and-so....".