Create and Test Forex Strategies
Following a fixed route, Forex Strategy Builder goes round each bar in order to execute or cancel all orders sent by the strategy. This route is determined by the four base points - Open Price, High Price, Low Price and Close Price. In most cases, this information is sufficient for a correct calculation of the historical test. If the strategy sends close orders, however, and they are within the limits of the current bar, it is not always possible to determine for sure what the order of order execution is.
Those bars for which we cannot tell for sure the correct sequence of order execution, are called Ambiguous Bars.
Forex Strategy Builder provides various interpolation methods for calculating the back test. Each one of these methods interpolates the ambiguous bars in a specific way. If the strategy contains a large number of ambiguous bars, the end balance of your virtual bank account can vary significantly with the different methods.
With this method, FSB aims at executing the order which will bring about a more negative result.
Examples:
The Shortest method goes round each bar, following a fixed route, depending on whether the bar is rising or falling;
These are the shortest possible routes through the bars, which is how the method gets its name. With them, the price never goes back to a previous value.
The Shortest method imitates the development of a maximally effective market. The chosen order of going through the key points is valid for 90% of the bars.
This method, however, has a major flaw. Because the price moves in a single direction through the margin points, if we have two valid orders in most of the bars, this leads to major distortion of strategy result.
Example:
Because of the extreme results this method brings about, it can serve as a good basis for comparison with the other methods.
With this method, Forex Strategy Builder will execute the nearest of all active orders in the current bar.
Example:
This method's logic is opposite to the logic of the Pessimistic method. Forex Strategy Builder aims at executing the order which will bring about a higher profit.
Examples:
With this method, Forex Strategy Builder executes orders in a random sequence. The statistical probability that a given order be executed is inversely proportional to the distance to it. The nearer order is more likely to be executed than the further one.
If the backtest shows ambiguous bars, you may use the Method Comparator in order to compare the result of calculations of all the methods you want. The comparator plots all balance lines on a single chart as well as a mean balance line making easier their visual comparison.
We can see on the above chart that the “Shortest” method shows lower than the “Pessimistic” method result. That's why we recommend using the comparator if there are a number of ambiguous bars.