Stages of developing of an automated trading strategy

There are several steps from the initial idea for some rules that the trader thinks could be profitable to the moment when we start trader on a live account with these rules. In this article, we will introduce you to the main stages in the process of developing one automated trading strategy. We use this process in our company FXZig in order to receive the most profitable and stable results for the trading robots that we introduce to you.

Everything begins with the idea – a set of rules that logically look profitable, but they need to be tested (for example crossover of two moving averages). Especially important is the idea to be quantitative – to be clear unambiguously when and how we trade. Any ideas that cannot be described with rules, cannot be converted into code and cannot be tested. Even though they can be profitable we cannot test them, cannot measure them, and are not subject to this article.

After we have already a clear idea of what we want to test, we need to convert the rules into code.

The first stage is Backtesting – testing the rule on historical data. The data of which we test this code is good to be at least 2-5 years including different market conditions – up and downtrend, range, high, and low volatility periods. Also, we need to have one-minute data even we test on one hour or daily charts in order to have proper testing on how the price was moving inside the bars (H1 or D1) on which we test.

During of process of testing normally we change and optimize some parameters. This could cause the „curve fitting“ of our trading robot. This means that the equity chart becomes optimized to the exact historical data with which we test. We reduce the impact of this by using In-Sample and Out-of-Sample data. We divide the data range that we have on two parts – the first one is bigger, and this is In-Sample data. We do all tests and optimizations just on this data. The second part is normally 20-30% of the whole data range and we use it for Out-of-Sample data. After we have a profitable Forex trading robot based on In-Sample data, we check if the equity curve and profit indicator in Out-of-Sample data are like these ones in the In-Sample part. If it is possible that we found some market dependence.

And the last stage is Forward testing. We start paper-trading for this strategy and monitor if the trading robot behaves like In-Sample and Out-of-Sample data. You could do this on a demo account and check the trades results after. If everything is fine on the Demo account, you could move to the next stage and start live trading with this expert advisor.

All of our expert advisors are developed following this working process in order to provide the best possible quality to our users.

Please note that although all tests, still all trading strategies carry high risk and you have to risk only the funds that you can afford to lose. To minimize the risk and increase the profit, even more, you can use a portfolio of expert advisors.