forex software

Create and Test Forex Strategies



The Method Comparator calculates a strategy by using different interpolation methods and shows calculated balance lines on a common chart.

Method Comparator

The comparator’s goal is to give a full idea of the strategy performance. Ultimately, you are looking for a strategy without ambiguous bars. When there are no ambiguous bars, all interpolation methods show the same result. In such a case, the method comparator is not of great use. However, a strategy without ambiguous bars might be hard to create and in the end, you will want to make use of the comparator.

1. Interpolation Methods

FSB Pro comes with five interpolation methods: pessimistic, optimistic, nearest, shortest and random. These methods interpolate the bar in different ways and each has a different goal. You can enable and disable methods from the check boxes that are near to their names.

On the left side you can select the methods that you want to calculate and when you hit the “Start” button below, FSB Pro will perform backtest calculations and will plot the results on the chart.

Pessimistic – This method will choose such a sequence of making the orders, in which the strategy will have the least possible result. For example, if you have an open position and in the range of the same bar, you have set a take profit and a stop loss orders, and they are both available in this bar. If you are using the pessimistic method, the strategy will directly execute the stop loss order. The goal of this method is to display the safest backtest possible.

Optimistic – This method aims to display the best possible result. If we take the example from the previous paragraph and apply the optimistic method, the backtester will go directly to the take profit order, to make sure the strategy has the best result possible in this bar.

Nearest – The nearest method will execute the order that is closer to the current price. In the example above, the stop loss is 30 pips away and the take profit is 20 pips away, the program will execute the take profit first.

Shortest – Executes the orders in such a way, so it creates the shortest possible route between the way points of the bar - Open, High, Low, Close and all orders in the range.

Random – When there is not enough data to know which order the backtester should execute first, it will execute the orders in a random fashion. If an order is nearer to the current price, it has a proportionally higher chance to be executed first. In the example above, assume that the stop loss is two times nearer to the current price than the take profit one. This means the chance that the backtester will execute the stop loss is two times higher.

Why do you need to compare the methods, should it not be enough to use the pessimistic method? The answer is “No”. There are cases where the pessimistic method would not show the lowest possible result, and where the optimistic method would not show the highest. This happens because of something similar to “curve-fitting”, the term we use is “method-fitting” – this happens when you unknowingly over-optimize a strategy for a certain interpolation method.

Mean line – shows the average of all interpolation methods.

You can improve the precision of the backtest by using interpolation with shorter periods (“intrabar data”, you can enable this option from the control panel). The precision of the backtest with interpolation methods lowers with the increase of the period used. For example, if you use D1 data to test a D1 strategy, a backtest that uses interpolation, will be much less precise, if you use M1 data through the intrabar data option. To enable intrabar data go to Control Panel → General → Backtest Settings → Check “Automatic scan – use all shorter periods and tick data to improve interpolation”.

If your strategy has ambiguous bars, it is best to make sure all interpolation methods show profitable trading results. If this is not the case and if you still want to test a strategy like that, we recommend doing that on a demo account.

2. Comparator Chart

The comparator shows calculated balance lines on a common chart. You can visually compare and evaluate the lines.

The program shows Random method results in a colored area between two bands. The upper band is the test with the highest net balance. The lower band respectively is the balance line of the test with the lowest net balance. There is a mean line between both bands.

You can easily distinguish the mean balance line because the program plots it bolder.