Create and Test Forex Strategies
In this article we will explain in short the most important tools in EA Studio. The order of the tools will follow the basic workflow. This means we will see how to generate strategies (or create them manually). Them we will see the Collection, the Optimizer, the Robustness testing tools and in the end we will be ready to export the strategy as an Expert Advisor.
The generator composes strategies from predefined logical blocks. When a strategy is composed the Generator will backtest it on historical data. If the backtest results pass your Acceptance Criteria the strategy will end up in the Collection. The Acceptance Criteria are just a list of rules that a strategy has to meet before it is even considered to be profitable.
You start the generator by pressing the green “Start” button at the top. When the Generator is running the button will be replaced by a red “Stop” button.
The Collection is the place where generated strategies are stored. Again those will be only the strategies that pass your criteria for profitability or other strategy backtest results.
The Collection will also store strategies that you create in the Editor. Another great feature of the collection is that it allows you to sort and filter the strategies within it. So it enables you to easily find the best ones.
If the number of strategies within the Collection reaches 100 and the generator continues to work only strategies better than the current ones will be added. For each new strategy added to the collection EA Studio will automatically remove the worst strategy in the list. This ensures only the best strategies remain.
If you click any of the strategies in the Collection it will open in the Editor.
The Editor is very useful. It shows us the strategy structure, allows us to review and change the strategy properties and indicator logic.
In the Editor we can see the input information (Market Info and Account Info tabs on the left side) and the Backtest output information (right side of the page).
As soon as we change anything in the strategy EA Studio will instantly backtest it and display the results.
From the top part of the page you can change the data source. By default you will see “MetaTrader-Demo” but you can add yours later. To the right of the Data Source you can change the symbol and the period of the data that will be used to backtest the strategy.
In the right-top corner of the page you can see the “Export” dropdown menu. This allows you to easily export Experts for MetaTrader 4 and 5.
The Optimizer optimizes the strategy. It will change the indicators numeric parameters and attempt to make the strategy more profitable. When done it will display the most profitable option.
The Generator and the Optimizer is so powerful they can curve fit the strategy to the historical data. Curve fitting means the strategy will almost perfectly work on the historical data but will be fragile in real trading. To prevent that phonomenon and make deeper analysis of the strategy performance we use testing tools like Monte Carlo.
Monte Carlo tests the strategy’s robustness. It simulates more severe conditions for the strategy - market variations, execution problems and strategy variations. With these simulations you can easily filter the over-optimized strategies.
When you run the Monte Carlo tool, you actually do not run a single test but 20 (by default) tests. Each test can use one or more simulations.
If the simulation tests show only profitable results the strategy is performing well.
Multi Market is another strategy validation tool. Best result is expected to be on the market for which the strategy was created.
The Report tool has several sub-tabs that show detailed information about the strategy.
Shows some the Market Info and the Backtest Output columns. In the Market Info you will see the parameters of the data that was used to backtest the strategy. In the Backtest Output you can see more on the statistical results from the backtest.
Shows the charts of the indicators in the strategy. Also the entries and exits the strategy did on the market during the backtest.
Shows you a log of all deals. Allows exporting the data to a CSV file for further analysis in Excel.
Uses one part of the data to “train” a strategy (also called “In sample” part). Then simulates trading on the rest of the data (“Out of sample” part). EA Studio can apply your Acceptance Criteria to all the parts - the In Sample, the OOS and also to the complete backtest
The Tools page also has several tabs.
The Settings include the Account Settings. Those allow you to set up your account to be just like the one you have in MetaTrader. This will guarantee you see the same backtests in EA Studio as in MetaTrader (considering you also have imported your own data to EA Studio).
Set trading session options here. Those are useful you want to limit the execution time.
As we mentioned before the Acceptance Criteria are used in Generator and the Optimizer.
The three sections (Complete backtest, In sample, Out of sample) are used by the OOS Monitor tool too.
Here you can switch indicators on and off. This will information is available to the Generator. It will use only enabled indicators in when it creates new strategies.
The Data Horizon tool lets you limit the length of the data used in bars. You can also choose to set the start date and end date for the backtest. The latter is useful for something called a “future test in the past”.
If you decide you can use the Data Horizon to thee strategy on one part of the data and then test it on another part.
Allows you to import data from your specific broker, which as we mentioned above is very important. Using data from your broker will allow you to get the same backtest results in EA Studio as those in the MetaTrader tester.
Going through the tools in this order explains the the manual workflow. Generate a strategy, optimize it, do robustness testing with Monte Carlo, Mutli Markets, OOS and finally export as Expert Advisor.
EA Studio also comes with the tool to automate your workflow. In the you might have seen that on the first place in the menu the Generator is not the only tool, we have also the Reactor.
The Reactor does all the manual steps automatically in the sequence we just descibed. First it generates strategies, then it backtests them and if they fit the Validation Crieria it passes them to the robustness testing tools. If the strategy passes all the stages we set up in the Reactor it ends up in the Collection.