Discussion of article "Timeseries in DoEasy library (part 58): Timeseries of indicator buffer data"

 

New article Timeseries in DoEasy library (part 58): Timeseries of indicator buffer data has been published:

In conclusion of the topic of working with timeseries organise storage, search and sort of data stored in indicator buffers which will allow to further perform the analysis based on values of the indicators to be created on the library basis in programs. The general concept of all collection classes of the library allows to easily find necessary data in the corresponding collection. Respectively, the same will be possible in the class created today.

Compile the EA and launch it on the chart having set in settings to use only current symbol and current timeframe. In comments on the chart, data of the first and zero (current) bars of all created indicators will be displayed:


Same indicators with the same settings are plotted on the chart for more clarity - indicator data in comments on the chart and in data window (Ctrl+D) match and values on the current bar update.

Author: Artyom Trishkin

 
It feels like the steam train has travelled a long way and the passengers are running behind.
 
Yes, that's right about the steam locomotive. I feel like, based on what we've done so far.
you could write a manual on how to use it. I was thinking
given the current state of the library, I'd like to get all the data on the results
of trading for a certain period in the past, like how many trades there were,
on what symbols, with what profit, etc. and I could not figure it out.
Can you tell me how to do it?

 
Alexander:
Yes, that's right about the steam locomotive. It seems to me, based on what's already been done.
you could write a manual on how to use it. I've been wanting to
given the current state of the library, to get all the data on the results
trading results for a certain period in the past, for example, how many trades there were in total,
on what symbols, with what profit, etc. and still could not figure it out.
Can you tell me how to do it?

A guide with examples of how to solve various problems will be made after the library is fully completed.

For now, each article has examples of how to use the functionality described in the article.

 

The author should get a medal for the absolute record for the number of parts of one library :)

 
Aleksey Mavrin:

The author should get a medal for the absolute record for the number of parts of one library :)

What prevents you to write and take this medal yourself?

 
Can you imagine if all the programmers who write programmes and constantly improve them, for example, the same
Metaquotes, before writing a help on the platform and the MQL language, told everyone when they first released the platform.
MT4, wait, we are going to release MT5, and then integration with SQL, and then with Piton.
we'll release the help for everything at once. And secondly, I did not find the EA in your latest release.
ToDoEasyPart56 not a single line about working with historical orders.
 
Alexander:
Can you imagine if all the programmers who write programmes and constantly improve them, for example, the same
Metaquotes, before writing a help on the platform and the MQL language, told everyone when they first released the platform.
MT4, wait, we are going to release MT5, and then integration with SQL, and then with Piton.
we'll release the help for everything at once. And secondly, I didn't find the EA in your latest release.
ToDoEasyPart56 not a single line about working with historical orders.
This series of articles is about the process of creating the library. Not about improving its first implementation, but about the consistent creation of functionality. Examples of working with the order system are, of course, in the articles dedicated to the creation of this library functionality.
 
Artyom Trishkin:
This series of articles is about the process of creating a library. Not about improving its first implementation, but about the consistent creation of functionality. Examples of working with the order system are, of course, in the articles devoted to the creation of this library functionality.

The problem is that after subsequent improvements and consistent creation of the functionality,

the examples that apparently worked in the articles devoted to this functionality now in the next

versions do not work, at least for me. That's why I asked you for help, because I thought that you would have

they will work.

 
Alexander:

The problem is that after further refinements and consistent creation of functionality,

examples that apparently worked earlier in the articles dedicated to this functionality are now in the following ones

versions do not work, at least for me. That's why I asked you for help, because I thought that you had

they will work.

Of course, the library expands, something changes. But the basic principles remain the same. The examples show logic, not a clear plan of action.
Just show your code and tell me what is not working for you.
 
Artyom Trishkin:
Naturally, the library expands, things change. But the basic principles remain the same. The examples show logic, not a clear plan of action.
Just show us your code and tell us what is not working for you.

In the TestDoEasyPart56 function void OnInitDoEasy() at its very end, I inserted this code to

get a collection of historical orders from the date D'2020.12.11 10:00' to the current one. And I didn't get a single

orders did not get this code.

CArrayObj* list_positions=engine.GetListHistoryOrders();
           // list_positions=CSelect::ByOrderProperty(list_positions,ORDER_PROP_SYMBOL,Symbol(),EQUAL);
            list_positions=CSelect::ByOrderProperty(list_positions,ORDER_PROP_TIME_CLOSE,D'2020.12.11 10:00',MORE);
            //--- Выбираем позиции с прибылью болше нуля
            list_positions=CSelect::ByOrderProperty(list_positions,ORDER_PROP_PROFIT_FULL,0,MORE);
            if(list_positions!=NULL)
              {Print("OK1");
               //--- Сортируем список по прибыли 
               //list_positions.Sort(SORT_BY_ORDER_PROFIT);
               list_positions.Total();
               Print(list_positions.Total());//                                здесь получаем 0
               //--- Получаем индекс позиции с наибольшей прибылью
               int index=CSelect::FindOrderMax(list_positions,ORDER_PROP_PROFIT);
               if(index>WRONG_VALUE)
                 {Print("index= ",index);
                  COrder* position=list_positions.At(index);
                  if(position!=NULL)
                    {
                     //--- Получаем тикет позиции с наибольшей прибылью и закрываем позицию по тикету
                     Print("OK");
                     Print(engine.GetListDeals());
                    }
                 }
              }

In the place where I print Print(list_positions.Total()); I get "0".

Совершение сделок - Торговые операции - Справка по MetaTrader 5
Совершение сделок - Торговые операции - Справка по MetaTrader 5
  • www.metatrader5.com
Торговая деятельность в платформе связана с формированием и отсылкой рыночных и отложенных ордеров для исполнения брокером, а также с управлением текущими позициями путем их модификации или закрытия. Платформа позволяет удобно просматривать торговую историю на счете, настраивать оповещения о событиях на рынке и многое другое. Открытие позиций...