Method Comparator

We are going to demonstrate how the comparator works using the demo strategy “Demo scanner”:

  Opening point of the position
      Indicator:  Pivot Points
      Logic:      Enter long at S3 (short at R3)
      Parameters: Base price: Previous bar range, Use previous bar value: Yes
  Closing point of the position
      Indicator:  Pivot Points
      Logic:      Exit long at S1 (short at R1)
      Parameters: Base price: Previous bar range, Use previous bar value: Yes

This strategy reveals about 600 ambiguous bars in the historical test. An ambiguous bar is any bar which allows different ways of executing the orders. In such cases, Forex Strategy Builder makes use of several interpolation methods. Each method traces a different price route. What is more, the orders are executed in a different sequence, which seriously affects the final result.

Following below are the balance charts of the strategy's test, performed using both the pessimistic and the optimistic interpolation methods. Initial account is $10,000

The pessimistic scenario leads to a final result of $1637, while the optimistic one results in $58954.

Pessimistic Balance Optimistic Balance

The charts emphasize the importance of choosing between the two scenarios when calculating a strategy which contains a large number of ambiguous bars.

The Method Comparator tool serves to visualize the various scenarios for carrying out the historical test of the strategy on a single chart.

Method Comparator

You can choose which methods should be visualized here. The comparator will calculate the average balance line. We assume that this average line is maximally close to the real strategy result.

In order to improve the test's accuracy, you can use the automatic scan function. It can be activated from the Testing - Automatic Scan menu. After activating it, you need to load intrabar data using the Scanner tool.

Here are the charts of the same strategy with automatic scanning activated:

Pessimistic Balance - scanned Optimistic Balance - scanned

You can clearly see from the chart that the pessimistic method is “too pessimistic” in this example. Using intrabar data improves the accuracy. It reduces the number of ambiguous bars. You can see that the strategy starts making profit at the moment scanning is included. This is so because Forex Strategy Builder applies the chosen interpolation method to the ambiguous bars only, and their number is significantly reduced by the process of scanning.

The above chart also shows a correction of the optimistic scenario. This, subsequently means that the optimistic interpolation method is “too optimistic”.

The automatic scanning function affects the method comparator, too:

Method Comparator - scanned

This chart shows how the scanner corrects the too optimistic or the too pessimistic balance lines, and gives the chart the characteristic shape of a bullet.

Here is another strategy:

  Opening point of the position
      Indicator:  Bar Opening
      Logic:      Enter the market at the beginning of the bar
      Parameters: Base price: Open
  Opening logic condition
      Indicator:  Momentum
      Logic:      The Momentum rises
      Parameters: Base price: Close; Period: 10
  Closing point of the position
      Indicator:  Stop Limit
      Logic:      Exit at the Stop Loss or the Take Profit level
      Parameters: Stop Loss: -20; Take Profit: 20

Testing this strategy reveals 2,5000 ambiguous bars. This number is too big and presupposes significant changes in the test result with the various scenarios.

By default, testing is conducted until Margin Call.

Comparator - Margin Call

You can see from the chart that all methods, except for the optimistic one, bring about bankruptcy (Margin Call). This, however, significantly distorts the average balance line because what remains after the bankruptcy is only the optimistic method line.

To achieve a more accurate result, you can ask Forex Strategy Builder to test the strategy covering all data. In order to do this, you need to deactivate the Testing - Trade until a margin Call option.

View how the chart will look in that case:

Comparator - no Margin Call

 
manual/comparator.txt · Last modified: 2008/06/17 02:59 by georgieva