Discussion of article "Applying OLAP in trading (part 3): Analyzing quotes for the development of trading strategies"

 

New article Applying OLAP in trading (part 3): Analyzing quotes for the development of trading strategies has been published:

In this article we will continue dealing with the OLAP technology applied to trading. We will expand the functionality presented in the first two articles. This time we will consider the operational analysis of quotes. We will put forward and test the hypotheses on trading strategies based on aggregated historical data. The article presents Expert Advisors for studying bar patterns and adaptive trading.

Here is a brief summary of what was implemented in previous articles (if you haven't read them, it is strongly recommended that you start with the first two articles). The core was in the OLAPcube.mqh file which contained:

  • all basic classes of selectors and aggregators
  • classes of working records with source data (the abstract basic 'Record' class and a few specialized 'TradeRecord' child classes with data on deals)
  • basic adapter for reading various (abstract) data sources and forming arrays of working records from them
  • specific adapter for the account trading history HistoryDataAdapter
  • basic class for displaying results and its simplest implementation which uses data logging (Display, LogDisplay)
  • a single control panel in the form of the Analyst class which links together the adapter, the aggregator and the display

Specific HTML report related fields were implemented in the HTMLcube.mqh files, in which classes of trades from the HTML report HTMLTradeRecord and the adapter that generates them HTMLReportAdapter are defined.

Similarly, CSVTradeRecord classes of trades from CSV reports and an adapter for them CSVReportAdapter were implemented separately in the CSVcube.mqh file.

Finally, to simplify OLAP integration with MQL5 programs, the OLAPcore.mqh file was written. It contained the OLAPWrapper wrapper class for the entire OLAP functionality used in demonstration projects.

Since the new OLAP processing task addresses a new area, we will need to perform refactoring of the existing code and select the parts of it which are common not only for the trading history but also for quotes or for any data sources.

Author: Stanislav Korotky