Sample Strategy – Trend-Following
In the previous chapter, we developed two trading applications: one to use in production and another one to facilitate the testing and research of trading strategies. Better said, these are two versions of the same application, with different data processing modules. We designed them so that the trading logic developed in the backtesting app could be used in the production one without modifications (or with just minimal modifications in complex cases). We also tested the code using a sample "strategy" and saw that the code worked correctly, but the "strategy" was steadily losing money – fortunately only on paper (and that’s why I consistently put this word in "italics").
Now it’s time to learn the process of researching and developing one of the most popular classical trading strategies applied to the FX market. We already discussed it earlier in the book, but only from a qualitative, not...