Once you create a trading system, you can see that there are two buttons in the top menu of the simulator manager (Simulate and Optimize). The optimize button allows you to create several variations of a trading system by changing the value of optimizable variables on each run. Let's say we want to try different moving average periods. We can vary the MA period from 10 to 50 and a step of 10. By using the optimizer, we will create five trading systems, each one backtested using a different moving average. Steps: - Select "Analysis -> Simulator" - Create a new trading system ("New" button) Using the Wizard (Under "Create a trading system using the wizard") - Under "Buy" panel, click on "Add Rule" - Type the following rule: close > sma(a) - The variable "a" will be added to the optimization grid - Set "10" as "Min", "50" as "Max" and "10" as "Step" - Click on "Close" Using the formula editor (Under "Create a trading system using the formula editor") - Type the following formula: Optimize("op0", 10, 50, 10); // Create an optimizable variable "op0" Rule1 = (close) > (sma(op0)); // Use the variable "op0" in the moving average period buy = (Rule1); // Set buy condition
|
|