Discussing the article: "Category Theory in MQL5 (Part 23): A different look at the Double Exponential Moving Average"

 

Check out the new article: Category Theory in MQL5 (Part 23): A different look at the Double Exponential Moving Average.

In this article we continue with our theme in the last of tackling everyday trading indicators viewed in a ‘new’ light. We are handling horizontal composition of natural transformations for this piece and the best indicator for this, that expands on what we just covered, is the double exponential moving average (DEMA).

The purpose of this article is to highlight the concept of horizontal composition of natural transformations. We have considered its antonym in the last article, where we saw how we can retrieve three functors  between two categories, which implies two natural transformations in a vertical composition can be inferred when the categories are of data sets as simple as a price time series and a moving average time series of the same prices. For this piece we extend the moving average time series horizontally by adding a third category of moving averages of moving averages better known as the double exponential moving average. Our variant of this well-known indicator does not literally use the established formula but rather for our purposes it will simply smooth the moving average by just being a moving average of a moving average. The functor relationships are similar to what we had in the last article however were we have only two functors between categories as opposed to the three we had in the last. However, like in the last article, each functor between any two categories will have its own moving average period such that the natural transformation between each functor pair can help us form a time series buffer for analysis.


The significance of forecasting volatility in trading is perhaps not as crucial or critical as determining the type of position one should have in the first place (whether long or short). Nonetheless it does present us with an opportunity to examine any potential uses and improvements to other existing entry signal strategies or even the creation of new ones that utilize its ideas. This is something we have considered a lot in past articles and so a re-run here is not alien. We will look to pair our volatility forecasting which will be handled in an instance of an expert trailing class, with the in-built awesome oscillator signal class. Readers as always are welcome to test this class with other signals or their own private strategies to find out what jells best for them; for this article’s part we will stick to the awesome oscillator.

Author: Stephen Njuki

Reason: