forex software

Create and Test Forex Strategies

forex software

fsbpro_guide:strategy_properties

Strategy Properties

Strategy Properties is the first information tile of the strategy just above the Opening Point of the Position slot. The tile shows information about the type and the value of the trading amount, the adding and the reducing rules, the strategy protections: Stop Loss, Take Profit and Break Even, as well as the Martingale money management rules.

Strategy Properties panel

When you click on the box, an options panel appears to the left of the strategy area. We call this panel Strategy Properties options panel. It contains menus and numeric boxes for controlling all these settings.

Forex Strategy Builder Professional monitors the values in the options panel and calculates the strategy at every single change. You can monitor the strategy performance on the Account Statistics table and on the Balance / Equity chart in real time.

When you are ready with the options, you can close the Strategy Properties panel either by clicking on the small triangular icon at the upper right corner of the panel or by using the “OK” button. The “Cancel” button reverts all changes you made and closes the panel. There is also a small green button in the lower left corner of the panel. It resets all strategy parameters to their default values.

1. Entry Lots and Maximum Lots

This field contains one of the most important strategy parameters - the trading unit, the position opening amount, and the maximum number of open lots a strategy can reach.

Unit for trading amount option sets the type of the entry unit. There are two possibilities: “Lot” and “Percent”.

The selected trading amount type determines the meaning of the next three parameters:

  • Entry amount for a new position
  • Amount to add on addition
  • Amount to close on reduction

If you select “Lot”, all these three parameters will be in lots. Their values will be constant for the complete testing period. If you select “Percent”, the values of the parameters will be in percent and calculated according to the current account equity.

Entry amount for a new position option sets the amount of the trading asset that will be open when the strategy opens a new position.

Maximum position amount [lot] option sets the maximum amount that a strategy can reach either from an initial opening or from multiple additions. A strategy cannot override this value. If a strategy signal tries to add greater amount to a certain open position and the total amount is going to go over the limit, the backtester will cancel the order. It is important to remember that we always measure the value of “Maximum position amount” in lots, even if the unit type is percent.

2. Additional Entry Signals


A strategy sends two types of signals:

  • Entry signals - signals sent by the entry part of a strategy. These signals open a new position or modify an open position by adding additional amount or closing a part of the position.
  • Exit signals - signals sent by the closing part of a strategy. They aim to close a currently open position.

The entry signals may act differently depending on the position status and the selected options.

When a strategy sends an entry signal and there is no open position, FSB Pro will open a new position. We call such a signal “initial entry” since it opens a new position. The program only checks if there is enough money in our account in order to cover the required margin before the opening and executes the order. However, if a strategy rises an entry signal and we have already an open position, we call such signal an “additional entry signal”. We can separate these signals on two additional groups:

  • “Same direction signals” is a buy signal during a long position or a sell signal during a short position. Such signal opens additional lots in the same direction. We call this Averaging. It increases the position amount and changes its average price.
  • “Opposite direction signal” is a buy signal during a short position or a sell signal during a long position. Such a signal reduces, closes or reverses a position depending on the selected options.

Next same direction signal option has four preset variants:

  • Nothing - sets that the additional signal will be canceled. The program cancels both market and pending orders (if any) if at the moment of execution it find that there is an open position.
  • Winner - this setting allows the adding of lots to an already open position but only if it is making profit at the moment of averaging. If the position is at a loss, the program will cancel the entry order. We call such trading “adding to a winning position”. Such trading can fault because we trade on an already “developed” market and the adding price is less attractive than the initial entry. Despite of that, this is a correct move if we develop a trend following system.
  • Loser - contrary to the previous case, this option will allow adding only if the current position is at a loss at the moment. We call this “adding to a losing position” and is considered as a bad practice. However, some traders use it because the adding happens when the market retards and the price is “better”.
  • Add - the program adds to the current position without checking its profit.

Amount to add on addition - this numeric box sets what amount to add on an averaging. The adding value is measured either in lots or in percent depending on the selected trade unit. The program will execute an adding only if the next direction signal logic permits and also if the new amount will not exceed the maximum position amount limit.

Next opposite direction signal sets the behaviour of the additional entry signals in a direction opposite to the direction of an already open position. This option has four preset values:

  • Nothing - cancels a signal or already placed pending order.
  • Reduce - the position is reduced with a certain number of lots. The lots being closed are determine in the “units to close on reduction” numeric box. The program will not close more lots than the amount of the currently open position. In a case when the reducing amount is greater or equal to the amount of the position, the program will close the position.
  • Close - an opposite entry signal closes a currently open position.
  • Reverse - the program closes a current position and opens a new one in the opposite direction. The amount of the new position is determined by the value of the “Entry unit for a new position” numeric box.

NB: We are analyzing the behavior of those entry signals only sent by the strategy to enter the market. Although those are opposite direction signals and can reduce, close or reverse the position, they are not exit signals. Exit signals irreversibly close the position. Their behavior cannot be changed.

3. Position Protection

Position protections are options that can be switched on and off. When they are enabled, you can set a protection value in points. Be careful with that fact because a point has a different value depending on the number of decimal digits in the quotation.

A point is the minimal value that can be changed by the broker. For example lets have 5 decimal digits quotation for EURUSD and a long position open at Ask = 1.27350. A point has a currency equivalent of $0.00001. If we have spread 20 points and set a Stop Loss of 150 points, an exit order will be placed at 1.27180 (1.27350 - 0.00020 - 0.00150).

If our broker provides 4 digit quotation, the position price will be 1.2735 with a spread equal to 2 points and respectively, we have to set our Stop Loss numeric box to 15 points. Doing so, the position will be protected with an exit order at the same price 1.2718 (1.2735 - 2 - 15).

Stop Loss is a protection to the strategy in a case when the market goes against our position. It is placed always below a long position or above a short position.

Take Profit closes a position after the market has moved in you favor with a certain number of points.

Break Even protects a winning position from the case where a favorable market reverses against us. It places an exit order at a price where the position can be closed without either a profit or a loss. Forex Strategy Builder Professional places a Break Even order only after a position has made a predefined profit in points.

4. Martingale

Martingale is a popular money management system. Its main idea is to double the trading size after a losing trade. Martingale management in Forex Strategy Builder Professional expands this principle by adding an adjustable multiplier coefficient.

Martingale multiplier can be changed between 0.01 and 10. The multiplier's default value is 2.

When Martingale multiplier = 2, every next losing trade has a double size. The trading size is reset to the normal size after a winning trade or after a partial close or reversing of a position.

When Martingale multiplier = 1, the trading size is not changed. It is same as if Martingale option was switched off.

When Martingale multiplier < 1, the program will open lower amount after a loosing trade. This is anti Martingale pattern.

The formula for calculating entry size is:

NextAmount = EntryAmount * (MartingaleMultiplier ^ ConsecutiveLoses)

Example:

Multiplier Initial Entry After 1st Loss After 2nd Loss After 3rd Loss After Win
2.0 10000 20000 40000 80000 10000
1.5 10000 15000 22000 34000 10000
1.0 10000 10000 10000 10000 10000
0.5 10000 5000 2000 1000 10000

You can use the “Max open lots” parameter (described above in this article) to limit the position amount.