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
You're also our "reader"... Question:
Why do build timeseries if data is ready ( CopyTime(symbol,period,first_date+PeriodSeconds(period),1,times) )?
They are not ready. They are probably on disk. It's even possible that they are synchronized with server's history (if the chart is open or another program requested them recently).
But that doesn't mean that the function will just believe it. You need to query the data from disk, build a cache in memory, and only then can you tell that the history is there and starts from this date.
But neither this answer of mine, nor repeated answers from the developers, nor working code, nor documentation will help you. The function doesn't work the way you thought it would, there's a failure here.
Read the documentation more carefully, not selectively. The presence of history data on disk does not at all mean for the terminal "Definitely there". In this case (when accessed from the indicator), the functions only work with the timeseries cache in memory. It means that synchronous memory access is performed and if there is no prepared timeseries there, the date SERIES_FIRSTDATE (of the first element of the array) will not be returned. But of course, the request initiates preparation-loading of timeseries into memory.
SERIES_TERMINAL_FIRSTDATE request is connected with database initialization and synchronization with server, so the first call won't work immediately anyway.
In principle, the ability to get the required history is checked using SERIES_SERVER_FIRSTDATE. Of course, you can count on X iterations of history request, but if the terminal confirms the presence of history in SERIES_SERVER_FIRSTDATE, then the availability of time series data is only a matter of time (synchronization of m1 base with the server and generation of time series).
I got that, but tell me, why couldn't it be done the way I described above?
It would not have affected the speed of information processing in any way:
If there was any information on an instrument - record the date of the first occurrence of it and store it in memory - 8 bytes!
You can even not store it, but when you do SymbolSelect(), you put it into memory.
When we address it with the SeriesInfoInteger (SERIES_TERMINAL_FIRSTDATE) function, we get:
A -1 - no data
Б. 0 - no data available but not ready
В. Date of first information
Then everything would be clear and transparent.
-1 - Going to the server
0 - Wait for the next iteration to check and/or build the timeseries
> 0 Build timeseries
From your reference I understood that YOU almost did that, turns out not.
Apparently one programmer started writing and someone else finished
Your implementation is good for FOREX, but very inconvenient for FORTS.
For FORTS, quotes may not come for a long time and the time series is downloaded from the platform.
and you have to repeat the whole process again with server access!
Your implementation is good for FOREX, but very inconvenient for FORTS.
On FORTS the quotes may not come for a long time, and the time series is unloaded from the paiachi
and you have to repeat the whole process of getting the data all over again, with the server logging in!
Mikalas, I still have faith in you. You will definitely read all that has been said here.
FORTS Please help.
The multicurrency indicator is not that simple.
First, check the availability of the instruments:
Then open the charts of all the instruments used (an invisible chart object is enough) so that the history loads normally.
And only then try to load history using CheckLoadHistory.
But this may not be enough either.
And by the way I don't like this situation with multi-currency analysis and the construction of indicators either. How it is implemented.
It's a tambourine dance, before you start calculating something you need to make a bunch of checks... I haven't seen that in any other platform. Everything is simpler there from the user's point of view.
It's no secret that many people, even those who learned the MT4 programming are scared of complexity of MT5 programming.
If I were the developer, I would try to make our life easier. Combine all this tambourine in one command, like
GatData(RTS,1000)
and the terminal solves this task, makes checks, if necessary, opens charts, swaps history, updates, etc.
And after its execution I have actual data to work with.
Z.I. I remember there was a motto: "Terminal for housewives"...
Mikalas, I still have faith in you. You will surely read all that has been said here.
komposter!
(Anything further - no offence!)
What have you found BAD about my model of getting information on tamseries?
Because it's not from you!?
I'm trying to "get through" to the developers to make it easier for all of us
"life", but there are ALWAYS people like you who are the smartest!
So it will be like this!
And by the way I don't like this situation with multi-currency analysis and the construction of indicators either. How it is implemented.
It's a tambourine dance, before you start calculating something you need to make a bunch of checks... I haven't seen that in any other platform. Everything is simpler there from the user's point of view.
It's no secret that many people, even those who learned the MT4 programming are scared of complexity of MT5 programming.
If I were the developer, I would try to make our life easier. Combine all this tambourine in one command, like
GatData(RTS,1000)
and the terminal solves this task, makes checks, if necessary, opens charts, swaps history, updates, etc.
And after its execution I have actual data to work with.
Remember the motto: "Terminal for housewives"...
Hi!
A universal and simple approach would make it impossible to write efficient programs. You can't make one DyData function that will have all the checks - it will be a drag, unnecessary to the user in 95% of cases.
In the case of the indicator - it works as fast as possible with its chart data. It is designed for this purpose. If we make it "ready for any situation", a simple MA will slow down like a complex monster.
I am not defending the developers, by no means. I don't like a lot of things either.
But I'm trying to be constructive, and I understand that I don't know all the insides of the terminal.
Mikalas is right in some ways - clam up (not reading) and keep shouting "Uncomfortable!", and the discussions become popular and visible to the developers. And they do something about it (they've already fixed a few bugs on his tip).
So, I'm probably just grumbling for nothing )
komposter!
(Anything beyond that, no offence taken!)
What have you found BAD about my model of getting information on tamserials?
Because it's not from you!!!?
I'm trying to "get through" to the developers to make it easier for all of us
"life", but there are ALWAYS people like you who are the smartest!
So it will be like this!
I already got it.
The task was just to write an indicator. And it turned out that we had to improve the language.
I wouldn't give any advice if it was like this.)
I've already got it.
It's just that the task was voiced - to write an indicator. But it turned out that it was necessary to improve the language.
I wouldn't give any advice if it was that way.)
Andrey!
You've spent much more time writing your posts here.
You could have written an indicator for "my" claims (for FORTS) during this time.
And you've seen those "crutches" I'm talking about yourself!
Andrei!
You have spent more time posting here.
During this time you could have written an indicator for "my" whining (for FORTS)
And you've seen for yourself those "crutches" I'm talking about!
I wrote, that's why I know what I'm talking about.
You would have got your indicator by now too, if the goal was to get an indicator, not to fix the language.
I've written, which is why I know what I'm talking about.
You would have got your indicator by now too, if the aim was to get an indicator, not to fix the language.
I wrote an indicator, but it's impossible to use it.
I cannot use it! No matter what I try, I have problems everywhere!
I have OrderSendAsync() - no tracking mechanism, although there is ORDER_ID
There is a global variable - when I close the terminal, it resets itself...
There are "incomprehensible" delays in order execution - half done and the next
an accusation of charlatanism....
And so on...
I raise issues because problems and errors do exist.
(I'm not making them up!)
I trade on the BUREAU for REAL money, not for funnies!
And so it is ARCHIVAL to me and to ALL who trade that the trading functions
ARCHIVE that the trading functions are FREQUENT.
The architecture of MT5 is SUPER, I like it a lot, but everything has to work properly and
Access to data should be fast and easy.
И... Let's call it a day, please.