Discussion of article "Timeseries in DoEasy library (part 38): Timeseries collection - real-time updates and accessing data from the program"

 

New article Timeseries in DoEasy library (part 38): Timeseries collection - real-time updates and accessing data from the program has been published:

The article considers real-time update of timeseries data and sending messages about the "New bar" event to the control program chart from all timeseries of all symbols for the ability to handle these events in custom programs. The "New tick" class is used to determine the need to update timeseries for the non-current chart symbol and periods.

Compile the EA and set its parameters the following way:

  • set Mode of used symbols list for using a specified symbol list,
  • in the List of used symbols (comma - separator), leave only three symbols, one of them being EURUSD and
  • in Mode of used timeframes list, select working with the current timeframe only, for example:


Launch the EA on the chart. After a while, the journal displays the "New bar" event messages on used symbols for the current symbol chart:

New bar on EURUSD M5: 2020.03.11 12:55
New bar on EURAUD M5: 2020.03.11 12:55
New bar on AUDUSD M5: 2020.03.11 12:55
New bar on EURUSD M5: 2020.03.11 13:00
New bar on AUDUSD M5: 2020.03.11 13:00
New bar on EURAUD M5: 2020.03.11 13:00

Launch the EA in the visual tester mode on the chart of one of the symbols selected in the settings, for example on EURUSD, and see how the zero bar data changes in the chart comment:


As we can see, both lines containing data obtained in different ways, have identical values of received zero bar properties and are updated in real time on each tick.

Author: Artyom Trishkin

 

This is the most unfortunate name for a library, EVER!

:)

 
Flavio Jarabeck :

This is the most unfortunate name for a library, EVER!

:)

Why?

 

I understand that m_chart_id_main refers to the chart the program is running on, but why is this needed in every object in the library (given that they derive from the CBaseObj class)?

Also, can you please clarify how you intend to use m_chart_id in the future? 

class CBaseObj : public CObject
  {
// ...
   long              m_chart_id_main;                          // Control program chart ID
   long              m_chart_id;                               // Chart ID 
 
Dima Diall:

I understand that m_chart_id_main refers to the chart the program is running on, but why is this needed in every object in the library (given that they derive from the CBaseObj class)?

Also, can you please clarify how you intend to use m_chart_id in the future? 

For future. Graphic obj ... etc
 
Artyom Trishkin:
For future. Graphic obj ... etc

Do you intend to replace part or all of the MT4/MT5 charting capability with the graphic shell mentioned in some of your articles? If so, is it going to work both live and inside the tester? Just curious to understand a little more about your ideas & plans for this library ;-)

 
Dima Diall :

Do you intend to replace part or all of the MT4/MT5 charting capability with the graphic shell mentioned in some of your articles? If so, is it going to work both live and inside the tester?  Just curious to understand a little more about your ideas & plans for this library ;-)

Planned nothing so far. Wait and see...

Reason: