Discussion of article "Timeseries in DoEasy library (part 58): Timeseries of indicator buffer data"
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 :)
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?
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.
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.
Naturally, the library expands, things change. But the basic principles remain the same. The examples show logic, not a clear plan of action.
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".

- www.metatrader5.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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