[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 447

 
semiromid:



как заставить оператор

зациклить на один раз в советнике ?


you cannot force the operator. you can only force your head to think, and not always if you were not taught as a child.

PS

on the subject - make flags and control them.

 
semiromid:


Hmm. Isn't break used in theswitch statement?

Answer the questions, they're not hard for you at all .

как заставить оператор

зациклить на один раз в советнике ?

Тойсть что бы оператор сработал всего один раз за всю свою работу .

--------------------------------Я хочу понять как это делаеться .

Задача №2 : Зациклить оператор, что бы срабатывал четко через 20 секунд .

Generally, the Kovalev tutorial (available on MQL Community) discusses break in the for example, but states that it is a loop interrupt operator, so I believe it is appropriate to use it in switch and loops as well
 
semiromid:

Answer the questions, they are not difficult for you.


A book through a forum? That's cool! :)
 
AlexR:
Generally, in Kovalev's tutorial (available on MQL Community), break is discussed in the for example, but it is stated that it is a loop interrupt operator, so I think it is appropriate to use it in switch and loops as well.

I'd have a look at the help for operators of the compiler I'm writing the program in.
 

Hi all!

I forgot, when calculating an indicator with 1 bar prediction, what should be specified in the cycle? The countdown starts from 0 bar. i=0 - current bar, i=1 - next bar in the past. And 1 for the future is what?

 
Noterday:

1 into the future is what?


None. It is a 'time bar' = time 0-bar plus the number of seconds equal to the step at which the calculation is made. For extended work on the chart without reference to a zero bar, do the work in a 'time-based' loop. For example, you want to carry out the calculation on the time interval from bar 7 to zero and from zero to 7 bar (in the future). In this case, obtain the date of the "standard 7th bar", calculate the number of bars to be calculated, carry out the calculation "in time" to the required distance into the future.
 
sergeev:

you can't make the operator think. you can only make your head think. and not always if you weren't taught it as a child.

PS

on the subject - make flags and control them.


If you have nothing to write on the merits of the issue, why bother to flub?

You can only make your head think, and not always, if you were not taught as a child.

is it hard to think of an example ...? huh!? i'm sorry...

 
DDFedor:

None. This is 'bar with time' = 0-bar time plus the number of seconds equal to the step at which the calculation is made. For extended work on the chart without reference to a zero bar, run the work in a 'by time' loop. For example, you want to carry out the calculation on the time interval from bar 7 to zero and from zero to 7 bar (in the future). In this case, get the "standard 7th bar" date, calculate the number of bars to calculate, run the calculation "over time" to the required distance into the future.
Got it. Thank you!
 
semiromid:


If you don't have anything to say on the merits of the issue, why bother to flub?

I told you the substance of the question to use flags.

I'm sorry...

It's OK, no need to apologise.
If you try hard enough, you'll learn in about a year or so.
 
sergeev:

I told you essentially to use flags.

It's okay, don't apologize.
If you work hard at it, you'll learn in a few years.

I told you to use flags.

.
You think that's the right answer in a beginner's topic. It's ..... Clearly .

Please don't answer my questions again. You'd rather let newcomers in instead of helping me answer them clearly.