You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I think I've got it! Is the indicator launched right away together with the terminal? If so, before checking wait for communication with the server IsConnected() you have a very fast timer it has no time to synchronize!
Nice try. I was beginning to think it would work. But... No:
I replaced the OnTimer() function in the previous code with this one:
I think I've got it! Is the indicator started immediately with the terminal? If so, before checking wait for a connection to the server IsConnected() you have a very fast timer it does not have time to synchronize!
Or do it like this.
But we'll have to take into account the difference between server time and local time. Write back with the results!I'm not going to make crutches. There's an obvious bug in the language! We are waiting for developers...
Very interesting, it is supposed to work. But then again the timer is very fast, maybe the terminal doesn't have time to start accepting quotes. I have to think about it. How about making a normal timer for 5 seconds to test the idea?
Very interesting, it is supposed to work. But then again the timer is very fast, maybe the terminal doesn't have time to start accepting quotes. I have to think about it. What if we make a normal timer for 5 seconds to test the idea?
And I don't need a "fit" to check the idea. In real life, I need the fastest possible timer.
Very interesting, it is supposed to work.
You can always run the indicator in your terminal, wait 15 minutes and report back.
Okay, but I have a lot of other work to do. As soon as I get a break, I'll do an experiment.
And I think I even have an idea how to catch it.
Try it like this!
Try it like this!
There's the crutch again. You are trying to solve the problem by any means, even irrational ones, ignoring the cause of the problem - language errors. I don't think you should do that.
Added:
Yes, this kind of technique seems to work. As an option you can use it. Thank you! But I'd still like the functions to work properly.
First a reply from @Ihor Herasko. Code for playback:
Result:
According to the log entries. The terminal was switched off at 14:25. Next, switched on at 14:30. We check the time of bar M15. We started with TF M1. The indicator (code above) showed actual open time 12:15 (terminal time, lagged behind my local time by 2 hours). The result should have been 12:30! Conclusion - the error is present. And this method proposed by @Ihor Herasko does not work.
There are two significant errors in your approach to check: