
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 need to write a function that would return ticks from one date to the next. If successful, it would be true, otherwise it would be false.
And I can't manage to write such a nonsense. Because I don't know what to do with asynchrony. Renat's example through OnTimer is probably an option. But definitely not the way he cited. OnTimer can be used for a lot of things.
In short, an elementary date-to-date function can be brought in to make it work.
The tick volumes of the bars are completely inconsistent with what sits in the copyticks, so it's not clear how many ticks to query.
The script asks for data from a certain date.
Here is the result of two runs of the script at intervals of a few minutes:
That is, the ticks are requested from a certain date to the current moment.
The script asks for data from a certain date.
This is the result of two runs of the script at intervals of a few minutes:
That is, the ticks are requested from a certain date to the current moment.
I don't understand why you cite code that is inferior even to the documentation in terms of information. Thank you, of course. But that's not at all what I asked for.
Renate's code is much better, but it's not the same at all.
No, all previously downloaded ticks for each trade server are cached locally and extracted automatically.
There's a screenshot of the tick files on the previous page.
Thanks, I haven't studied the Bases folder in detail.
How can I request copyticks in OnTester to get all ticks that have been passed?
How can we query copyticks in OnTester to get all the ticks that have been passed?
In the current beta (today's release), call CopyTicks and get the last tens of thousands of ticks.
The tester uses a ring buffer to store ticks without the ability to get millions of ticks. It's costly to store all the ticks, hence the ring buffer. Maybe we can change this behavior though.
I don't understand why you cite code that is less informative than even the documentation. Thank you, of course. But that's not at all what I asked.
Renate's code is much better, but not at all.
In the current beta (today's release), call CopyTicks and get the last tens of thousands of ticks.
The tester uses a ring buffer to store ticks without the ability to get millions of ticks. It's costly to store all the ticks, hence the ring buffer. We can change this behaviour though.
How to determine the size of the ring buffer without having to query on every tick (very costly to do it in the tester) copyticks?
Let's say the ring buffer is 10000. Then I'll call copyticks every 10000 to make sure there's no skips. But there appears a problem in the form of ticks with one time (with accuracy to msec). I have them on the exchange. I do not want to count them twice, requesting copyticks from this time in ms.
My code is just to demonstrate the principle "to get very deep ticks you have to call CopyTicks several times to wait for paging". OnTimer suits well for it.
I realised that it was for demonstration purposes. That's why OnCopyTicks immediately came to mind.
Help with this, I'm having trouble with one or the other.
I need to write a function that would return ticks from one date to another. If successful it would be true, otherwise it would be false.
I don't understand why you give code that is less informative than even the documentation. Thank you, of course. But that's not at all what I asked.
Renate's code is much better, but it's not the same at all.
If you need to get from (old date) to (young date), you need it like this:
Query ticks (with a margin) from "old date". In received array go from index "0" and check date. As soon as you find the first occurrence (young date), you memorize it (index young date). At this point, you have determined that the array of ticks from index 0 to (index young date) contains the ticks you want.
If you want to get from (old date) to (young date), do the following:
Query ticks(with a margin) from "old date". In the received array go from index "0" and check the date. As soon as you find the first occurrence (young date), you memorize it (index young date). At this point you have determined that the array of ticks from index 0 to (index young date) contains the ticks you want.
With a margin, it's a waste. I make default request (2000 ticks, I think), and continue from the point (it's easy to get duplicated ticks), where I finished.
I do not understand why there is no such a function from the developers themselves. Why not overload copyticks with another working option?