Errors, bugs, questions - page 2189

 
AVAAR:

Thank you! Really - it works!)

And I had no idea that compilation had to be done regularly without even making changes...

It's enough to read what's written in the Experts and Log tabs or in the tester - to understand the reason.

 

If the script is called often - repeatedly after execution - the schedule offset stops working, i.e. commands for this action are skipped

   long handle=ChartID(); 
   if(handle>0) // если получилось, дополнительно настроим 
     { 
      ChartNavigate(handle,CHART_END,-2000); 
     } 
 
Aleksey Vyazmikin:

If the script is called often - repeatedly after execution - the schedule offset stops working, i.e. commands for this action are skipped

This is an asynchronous command.
 
Artyom Trishkin:
It is an asynchronous command.

Then how do you check if it is working?

 
Aleksey Vyazmikin:

Then how do you check that it's working out?

By the fact of displacement.
 
Artyom Trishkin:
On the fact of the displacement.

I see, i.e. the suggestion is to wait for the offset, if it doesn't happen, then repeat the offset command, right?

 
Aleksey Vyazmikin:

I see, so the suggestion is to wait for the offset, and if it doesn't happen, to repeat the offset command, right?

We need to think about how to catch asynchronous command triggering, and what the pitfalls may be.

Suppose we have a number of visible bar before issuing a command - we memorized it. Until the number changes, the command has not worked. When it changes, it works.

And if it is not changed? When do you decide that the command is lost in the queue and repeat the command? And if after repeating the command, the previous one did work, and we have another one in the queue - there will be an extra shift.

In general, we need to experiment. I can't think of it all at once...

 
Artyom Trishkin:

You need to think about how to catch asynchronous command triggering and what the pitfalls might be.

Let's say we have a number of visible bar before the command is given - we have it memorized. Until the number changes, the command has not worked. When it changes, it has worked.

And if it is not changed? When do you decide that the command is lost in the queue and repeat the command? And if after repeating the command, the previous command worked, and we have another one in the queue - it will be an extra shift.

Well, it's going to take some experimentation. I can't think of one right away...

Got it - tough case - I'll think about it, thanks.

 
Aleksey Vyazmikin:

Got it - tough case - I'll think about it, thanks.

If you rely only on the fact of the shift, the graph can also be shifted by hand - that's a hole in the logic...

 
Artyom Trishkin:

If you rely on displacement alone, the graph can also be shifted by hand - there's a hole in the logic...

After three minutes of experimentation, I've come to the conclusion that the shift comes from


and not from the current position.