[SERVICE DESK] Error in getting the time of the senior TF in the timer! - page 12

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 do not see the problem. A new candle appears - we recalculate the last candle in the indicator/advisor.
There is more than one new candle - we do a complete recalculation of the indicator/advisor.
This is the same - a new candle appears.
One more thing - the required periods should be constantly "pulled" to update them.
If there is nobody working on the symbol-period (quotes are not checked, the indicator is not running), then it "falls asleep", because it is considered unneeded.
We're pulling, we're pulling. We make a request, get an error, get out. But here, you see, another "peculiarity" comes out - the error does not reset after resetting. If it did, there would be no problem. But returning incorrect data is the problem. And I can see it very clearly.
The whole system of error checking goes down the drain on this example.
How does the terminal know that the latest data is out of date?
Because the history is there - it is there.
The request is sent to the broker... as soon as possible.
A new bar appears - the data is updated.
How does the terminal know that the latest data is out of date?
After all, there is a history - there is.
Request to the broker is sent... As soon as it is so.
A new bar appears - the data is updated.
Communication with the server is established. When requesting senior TF data, if data is not ready - error or return 0. If data is ready - return ONLY actual data. That's all. If data is not ready for a long time - let it return error or 0.
You didn't answer your question about the terminal version, by the way.
By the way, you didn't answer the question about the terminal version.
What does the terminal version have to do with it at all? New data, it's there or it's not. And no version will save them if they didn't come from the server.
The indicator simply starts before the new data arrives. Alternatively, move checks to OnCalculate, which is triggered when new tick is received.
Alternatively, move the checks to OnCalculate, which is triggered when a new tick is received.
it has been suggested several times, and so has the admin
in the indicatorOnCalculate() will be started at indicator start, but the second time OnCalculate() will be started at the tick receipt - here it is necessary to start timer and download new OHLC data
he has been offered it several times, and so has the admin
the indicator will start OnCalculate() at indicator start, but second time OnCalculate() will be started at tick receipt - here you need to enable the timer and download new OHLC data
Have a look at my last published code. It's not about timer, everything has been moved to OnCalculate() already. Still does not work when terminal starts.
Have a look at the last code I published. It's no longer about the timer, everything has already been moved to OnCalculate(). Still doesn't work when starting the terminal.
Well skip the first pass at startup
Well skip the first pass at start-up
Read point 1.