Forex Software
Forex Software Forex Strategy Builder Forex Strategy Trader Strategies Blog Forum
Welcome Contribute Partners Links Affiliate Advertise

Safety First

Ambiguous bars

Forex Strategy Builder tests a strategy which consecutively goes round the bars of data. For each bar the program analyses the strategy and gives the necessary orders. Another part of the program follows the fluctuations of the price and when reaching an order, performs a certain transaction. A problem arises when the testing algorithm does not have the necessary information about the exact route of the price. This occurs when interpolating a single bar of the loaded data.

The steady information, which the program has, is as follows:

  • Opening price – this is the starting point of the interpolation
  • Top price
  • Bottom price
  • Closing price – this is the point where the interpolation of the bar ends

These are the four points which need to be visited. What we know for sure is that the going round begins at Opening price and ends at Closing price. What we don’t know is the succession in which the top and the bottom prices for a bar are reached. Statistics show that with increasing bars, in 80% of the cases, the bottom of the bar is reached first, while with decreasing bars, it is the top that is reached first.

The question of the volatility of the price is a major one. It is actually the question of whether the price goes back to a value that has already been reached during the same bar.

This lack of sufficient information leads to ambiguity at interpolating the price in a bar which contains more than one order. Such a bar is viewed as ambiguous.

Forex Strategy Builder marks the ambiguous bars and lists their number in the statistical information. Decreasing their number leads to obtaining more-accurate results by the back test.

Top

Algorithm fitting

Fitting the algorithm consists in exploiting the testing algorithm so that it leads to better results.

This can be tested when we change the scenario used by Forex Strategy Builder to go round the points in the bar data and the change of the result will be evident. Of course, the change of the interpolation methods concerns the ambiguous bars only.

There are five interpolating algorithms and each one follows a given scenario. We will assume that the real, historical development is in between. We emphasize the fact that none of these algorithms, taken alone, guarantees reliable results.

The average chart of the Method Comparator is assumed to be closest to the real one.

One example of fitting the algorithm is the Stop Limit exit strategy, within the limits of a single bar. The optimistic scenario will show strongly overstated results, while the pessimistic one will show unrealistically understated results. The truth is somewhere in between.

Top

Over-optimization

Over-optimization (curve fitting) is a process of optimization of the indicator parameters to particular data. Computer technologies can be easily used for the purposes of over-optimization of a trading system to produce a seemingly fine result. The optimizer tests thousands of parameters values and can find the exact numbers, making this strategy very "profitable" for the data used. The problem is that such a "profitable" strategy is only profitable when applied to this particular data. However, it is most likely that it will be used in the real world.

The indicator parameters that work over a wide range are steadfast.

If a small change in the parameter value changes the strategy result dramatically, you should be careful.

For example, if a given system works well at MA(20) but does not work at MA(19) or MA(21), your parameters are over-optimized. On the other hand, if it works at Moving Average with a range of 15 to 25, your system is much steadier and more reliable.

Top

Multiple signals within the same bar

Enter the market at the beginning of the bar

Entering the market at the beginning of the bar guarantees that the closing price is reachable after the position has been opened. This helps avoid ambiguity as to which point was the first to reach.

If there is more than one closing price for a given position, Forex Strategy Builder will close all lots at the first reached level and will cancel all other orders. A safe situation will be when the two out coming prices are, simultaneously, either above the opening price or below it.

If one of the closing prices is above the Opening price, and the other one is below it, it is impossible for the tester to tell which price has been reached first (intrabar scanning can clarify the situation).

Exit the market at the end of the bar

It is safe to close the position not earlier than the end of the bar. Thus, we make sure that the price has first gone through the point of opening and the back test is correct.

When Forex Strategy Builder meets the next incoming order, it acts following the logic of Same Direction Signal and Opposite Direction Signal. Depending on the chosen values, the position can be brought to average, closed, or the signal can be ignored.

Top

Tricky indicators

It may sound strange, but there are indicators which change the previous signals. This behaviour of theirs is not of vital importance for the historical test, but it is disastrous for real time trading.

The Fibonacci indicator is one of them. It is based on the Zig-Zag indicator and determines the respective Fibonacci levels between the defined tops and bottoms. With static data they are strictly fixed; with real time data, however, it is possible for the price of some bars to fall and, afterwards, rise sharply. This results in a change in Zig-Zag's "opinion" of the previous peak values; consequently, it can change them. There follows a change in the Fibonacci levels between the last bottom - top. Forex Strategy Builder testing algorithm will take into account these changed values which best reflect the price movement. The problem arises in real trade, where we cannot change the level at which we have concluded a deal.

The difference between the forex strategy back test and the real trade, depending on the chosen logic, may consist in either overstated or understated results.

Practice shows that this is quite tricky. In cases when the result is unrealistically understated, we simply ignore this strategy. In the opposite situation, however, the overstated result can lead to real financial loss.

The only indicator, exhibiting such behaviour at Forex Strategy Builder is the Fibonacci indicator. We have marked it with For Demo Only!

Please, be extremely careful when using it.

More information is available in the forum.

Top

There are 7 comments
Asutosh
July 21, 2009 - 12:29

Hi Miroslav,

I came across this doc file and wonder how would it fit into the MetaTrader 4 which is generally offered by the forex brokers for mini lot trading. I am a beginner and just examining the brokerages.

Your strategy test appears excellent. But how can it be integrated with MT4 or other platform offered. Also, could it be automatically attached to these platforms?

How to make the strategy workable as an EA or Automated Trading?

These are some of the issues I want to understand. Your advise will be very useful.

Thanks.

Asutosh

Reply to Asutosh
Miroslav Popov
November 17, 2009 - 14:14

The new Forex Strategy Trader is able to load and automatically trade the strategies generated by FSB via MetaTrader.

DeniSenok=)
July 08, 2009 - 02:53

Сделайте РУССКУЮ версию сайта!!!

Masaru
April 22, 2009 - 10:11

How does the Fibonacci indicator determine the number of the previous bars to calculate the forthcoming ratio?

Masaru

Reply to Masaru
Miroslav Popov
April 22, 2009 - 11:41

Fibonacci indicator searches the last 15 bars for the Highest / Lowest point by default, but this number can be changed.
You can see the Fibonacci indicator source code for details.

Brian
February 17, 2009 - 21:39

Hi,

Can I put in "take profit" levels in this software?

brian

Reply to Brian
Miroslav Popov
February 18, 2009 - 03:25

Closing Point of the Position
Take Profit
Exit at the Take Profit level
Take Profit - 20

Leave a Comment


?
?