Articles » Tip of the Day list
Forex trading strategy
In the spirit of Technical analysis - the forex strategy is a combination of technical indicators that raise buy and sell signals at certain time and at certain price.
Entry and Exit strategies
A forex trading strategy can be divided on two main parts:
- Entry strategy - represents the logic of opening (averaging) a position.
- Exit strategy - represents the logic of closing the existing position.
Entry strategy
The entry strategy is represented by the "Opening point of the position" and "Opening logic condition" slots.
Exit strategy
The exit strategy is represented by the "Closing point of the position" and "Closing logic condition" slots.
"Opening point of the position" slot
This is the first strategy slot. Its indicator shows the entry price of opening or averaging a position.
"Opening logic condition" slot
Every "Opening logic condition" slot contains a logic condition. It serves as an entry filter. An entry signal can be raised when all the "Opening logic conditions" are fulfilled.
"Closing point of the position" slot
This is the first exit strategy slot. Its indicator shows the exit price of closing the existing position.
"Closing logic condition"
We can use a "Closing logic condition" when the "Closing point of the position" slot contains "Bar Closing" only.
"Closing logic condition" slot
Every "Closing logic condition" slot contains a logic condition. It serves as an exit trigger. An exit signal will be raised when one of the "Closing logic conditions" is fulfilled.
Adding a strategy slot
You can add new logic condition slots only. Opening and Closing point of the position slots are permanent. Maximum number of logic slots is four Opening and two Closing slots. A Closing logic condition slot is available when closing point is "Bar Closing" only.
Removing a strategy slot
Remove a logic slot by pressing its closing button. You cannot remove the Opening
and Closing point of the position slots. They are permanent.
All present "Closing logic condition" slots will be removed if you
make "Closing point of the position" different from "Bar Closing".
Edit the slot indicator
To open the indicator parameters dialogue simply click on the indicator slot. You will be able to choose a new indicator according to the type of the slot.
Changing the strategy slots representation
You can change the layout of all strategy slots by means of the three small square buttons above the strategy slots. They change the view only and do not affect your strategy in any way.
Same and Opposite direction signals
Same and Opposite direction signals are additional signals raised from the Entry strategy during a position. A change of their logic directly changes the strategy behaviour.
Same direction signal
Same direction signal is another buy signal during a long position or another sell signal during a short position.
Same direction signal - "Nothing"
This logic means that all additional signals in the direction of your position will be cancelled. There is no way to add more lots to the initial position in this case.
Same direction signal - "Add"
This logic allows the Entry strategy to raise additional signals toward the initial position direction and to increase its amount in lots. Forex Strategy Builder will average the price of the market position.
Opposite direction signal
Opposite direction signal is a buy signal during a short position or a sell signal during a long position. It has to be raised from the Entry strategy only. A closing signal from the Exit strategy is not an opposite direction signal.
Opposite direction signal - "Nothing"
This logic means that all additional signals in the opposite direction of your position will be cancelled. There is no way to close lots from the initial position in this case.
Opposite direction signal - "Reduce"
The Entry logic will reduce your market position with one lot in case of an opposite signal. Of course, this means that if your position amount is one lot only, it will be closed.
Opposite direction signal - "Close"
In case of an opposite signal raised by the Entry strategy Forex Strategy Builder will close your present position no matter of its amount.
Opposite direction signal - "Reverse"
An Entry strategy opposite direction signal closes the current position and opens a new opposite one. The amount of the opposite position will be one lot.
Entry strategy signals
The entry signals depend on the same and opposite signals logic. In case of adding to a position, the execution can be cancelled by the "Lot Limiter" if the number of position lots reaches the limit.
Exit strategy signals
The signals raised by the Exit strategy are independent from the logic of the same and opposite signal menus (as they concern the entry strategy only). An exit strategy signal can be cancelled when there is no position or when its direction is the same as the current position direction.
Ambiguous bar
A bar for that we do not have enough information to interpolate correctly. In an ambiguous bar, more than one order can be executed and we are not sure for the right sequence.
Two orders ambiguity
A back testing situation when there are two
reachable active orders in both sides of the current price.
For example, such a situation exists when there is a Stop Loss order
and a Take Profit
order within the limits of the present bar.
Closing ambiguity
A back-testing situation when the top as
well as the bottom of the bar have been reached and:
- The current price is higher than the bar closing but there is an order bellow
the bar closing.
- The current price is lower than the bar closing but there is an order above the
bar closing.
The problem is whether to close the bar or to execute the order first.
Methods of bar interpolation
Forex Strategy Builder provides several methods of bar interpolation.
They concern the sequence of order execution within the ambiguous bars.
The type of the interpolation method is not important when there are no
ambiguous bars.
Purpose of the interpolation methods
Without seeing into the future, the interpolation methods make decision what exact order to execute first within an ambiguous bar, according to the desired scenario.
"Pessimistic" method
This interpolation method tends to execute the order that will be at a loss or less profit. In case of a closing ambiguity, it will execute the exit order if the position is at a loss instead of transferring it to the next bar.
"Pessimistic" method idea
To observe the rule "Safety First!" the pessimistic method tries to find as bad scenario as possible. The idea is to prevent us from a method fitting.
"Pessimistic" method - Is it the worst possible?
No, it is not. It does not look into the future to see the result of the possible variants. It makes decision using the information from the current bar only. Therefore, it will leave open a profitable position and will transfer it to the next bar instead of closing it within the current bar.
Too "pessimistic" method
The pessimistic method of interpolation can be too pessimistic in some cases. For example, when there is a Stop Loss order far away from the opening price of the position and a very near Take Profit order. The back-tester will try to execute the Stop Loss order instead of the nearer Take Profit order.
Interpolation method - "Shortest"
This method leads the back-tester through
the shortest price route inside the bar.
The shortest price route is:
- White bar: Open – Low - High - Close
- Black bar: Open – High – Low - Close
This sequence is applies to 90% of the bars.
"Shortest" method idea
The shortest price-route applicable to a perfectly effective and zero volatile market only. In spite of that, it is good basis for comparison with the other methods because of its extreme result with some strategies.
"Shortest" method drawback
When back-tester follows the shortest bar route, it never looks beck. It cannot take into account an order placed at already passed price (Stop Loss). The back-testing result of this method can be sometimes better than the optimistic or worse than the pessimistic method.
Interpolation method - "Nearest"
Using the "Nearest" method of bar interpolation the back-tester prefers to execute the nearest order first in an ambiguous bar.
"Nearest" method idea
Let suppose that
the market is random and the price follows the Gauss distribution. Therefore,
the nearest order has biggest probability to be executed.
The result of this back test will be the same as the result on a perfectly random market.
"Nearest" method drawback
In case of closing logic "Stop Limit" with the stop price nearer to the entry order than the limit price, the back tester closes the position at a loss when it is possible. In the opposite case (nearer limit order), the back tester closes the position on profit.
"Optimistic" method
The optimistic interpolation method tends to execute the order that will bring bigger profit or less loss. In case of a closing ambiguity, it will execute the exit order if the position is on profit instead of transferring it to the next bar.
"Optimistic" method idea
The Optimistic method is presented as an alternative of the pessimistic method. It has to be used only for comparison to other methods and not as a base for strategy evaluation.
"Optimistic" method - Is it the best possible?
No, it is not. It does not look into the future to see the result of the possible variants. It makes decision using the information from the current bar only. Therefore, it will leave open a losing position and will transfer it to the next bar instead of closing it within the current bar.
Too "optimistic" method
The optimistic method of interpolation can be too optimistic in some cases. For example, when there is a Take Profit order far away from the opening price of the position and a very near Stop Loss order. The back-tester will try to execute the Take Profit order instead of the nearer Stop Loss order.
"Random" method
The random interpolation method executes the existing orders using a random route. The main principle is that the nearer order has bigger chance to be executed than the farther one.
"Random" method idea
If we suppose the market is random and there are no other factors influencing on the price, the "random" method will be the perfect one. Applied a number of times it gives us a clear enough picture of the strategy performance.
Usage of the "Random" method
You can make Forex Strategy Builder
recalculate the current strategy by pressing the "F5" key. Every time the
back tester will calculate the strategy using random price-route within the
ambiguous bars and the balance chart will be different.
The other option is to use the "Comparator" tool.
Comparator
The method comparator is a tool that calculates the strategy using all the interpolating methods and shows their results on a single chart. It also plots the average result. It is highly possible that the resulting line to be nearest balance line to the real historical balance of the present strategy.
Bar explorer
Bar explorer represents the price-route inside a bar.
You can open it by double clicking on a journal row or on a bar from the
indicator chart.
Scanner
Scanner performs intrabar scanning using all available data periods.
It is useful when there are ambiguous bars.
Scanner - usage
The first time you use it or after a change in the data period, you have
to load the available shorter period data. It takes about 10 seconds.
Press the "Scan" button to perform instantaneous scanning.
Quick scan
You can perform "Quick scan" by pressing "F6" from the program main screen. In case of the intrabar data has not been loaded earlier, the scanner window will be shown.


forexsb.com
or leave a message into the forum.