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

 
nemo811:

Hello.

Is running a loop to terminal time ignoring incoming ticks? I'm interested in tracking a given condition by the second.

The ticks and will be ignored until the next second starts, the minute is not important in this case. Or do you need something else?
 
001:
Ticks and will be ignored until the next second begins, the minute is not important in this case. Or do you need something else?

Do you have a working suggestion?
 
sergeev:

and did you offer anything?

Whatever the question, that's the answer. Happy New Year! All the best! Solve all your problems!
 
001:

Whatever the question, that's the answer.

you seem to have the questioner confused. his nickname is

nemo811

 

I didn't confuse anything, I just answered the gist of the question, I think the person who asked that question needs it. Most likely he is triggered on every tick, but he needs to be triggered on a certain second or every second. If at a certain second, then you need to change the condition I wrote a bit. If the BENT of the question is different, then the question will sound different.

For example: How to make the cycle start, not at every tick, but at a certain hour, a certain minute, a certain second?

 
001:

I didn't confuse anything, I just answered the gist of the question, I think the person who asked that question needs it. Most likely he is triggered on every tick, but he needs to be triggered on a certain second or every second. If at a certain second, then you need to change the condition I wrote a bit. If the BENT of the question is different, then the question will sound different.

For example: How to make the cycle start, not at every tick, but at a certain hour, a certain minute, a certain second?


You haven't really given an answer
 
001:
sergeev:
Vinin:

Thank you for the heated discussion on my issue.

I am using what I have at the moment to be specific:

  if (Seconds()==1)
   {
    if(!IsConnected())
     {
      Alert("Связь отсутствует!");
     }
   }

This is part of the algorithm, so don't be picky - I know that this functionality is already packed in the terminal itself initially.

The point is: this code is inside EA, and EA is looping with every tick (and only it, not a second). I need to make this condition to be tracked exactly every 1 second in a minute, without linking it to ticks. In other words, how do I make my EA cycle by time instead of ticks?

Regards :))

 
Or also - is it possible to make the script autorun? This relates to the same task of checking communication on the terminal as mentioned above.
 
nemo811:

Thank you for the heated discussion on my question.

For the sake of specificity, here is what I have at the moment:

This is part of the algorithm, so don't be picky - I know that in the terminal itself this functionality is already packed in initially.

The point is: this code is inside EA, and EA is looping with every tick (and only it, not a second). I need to make this condition to be tracked exactly every 1 second in a minute, without connecting it to ticks. In other words, how do I make my EA cycle by time instead of ticks?

Regards :))


Loop the Expert Advisor

Use the SLEEP() function when working

But it does not mean that the Expert Advisor will work with a given pause (as in all other cases)

 
Vinin:


Loop the EA

Use the SLEEP() function when working

But this does not mean that the Expert Advisor will work with a given pause (as in all other cases)

Yes - I have thought about that. Won't the computer become slower?

Although, Sleep() will probably save me from that...

Reason: