New article Prices in DoEasy library (part 62): Updating tick series in real time, preparation for working with Depth of Market has been published:
In this article, I will implement updating tick data in real time and prepare the symbol object class for working with Depth of Market (DOM itself is to be implemented in the next article).
I have created the tick data collection of all symbols used in the program. The library is able to obtain the required amount of tick data for each of the symbols used by the program and stores all of them in the collection of tick data. The tick data collection allows finding any required tick object and receiving its data. We are able to sort out the lists for conducting statistical research. However, new ticks are not entered into the tick database when new ticks arrive for symbols. In this article, I am going to implement this feature.
Each new tick will increase the number of stored objects in the collection. To limit their number, as well as the number of used memory, let's introduce a constant allowing us to set the maximum possible number of ticks stored in the library database for one instrument. This will protect us from running out of memory. If many symbols are used in the program and the database already contains a sufficient number of ticks, the library automatically removes the necessary amount of the oldest ticks. Thus, we will always have the specified number of ticks for the instrument. The default number is 200,000. This number should be sufficient for conducting statistical research for about the last two days. In any case, the maximum number of ticks stored in the collection for a single instrument can always be changed if necessary.
The string from the Refresh() method of the tick series class for AUDUSD is displayed in the comment of the chart — number of newly copied ticks, previous time current time and the total number of tick data objects present in the tick series list:
Author: Artyom Trishkin
Please enable the necessary setting in your browser, otherwise you will not be able to log in.