forex software

Create and Test Forex Strategies

forex software

fsb:manual:entry_filter

Table of Contents

Opening Logic Condition

Introduction

Opening Logic Condition

Opening Logic Conditions can be found in the blue slots below the Opening Point of the Position slot and above the Closing Point of the Position slot. By clicking on the Add an Opening Logic Condition button you can add technical indicators to your trading strategy for fine-tuning the logic of the trading algorithm. By default you can't set more than four Opening Logic Conditions. The logic is checked separately for long and short positions and can either be fulfilled or not fulfilled. It is possible that the condition is fulfilled for a short position, and not fulfilled for a long one. With some indicators, it is possible that the logic condition is fulfilled in both trade directions at the same time (ADX).

The purpose of the Opening logic conditions is to allow a market entry and provide a trading direction. An order is allowed only if all existing open logic conditions are met.

If the strategy does not include entry logic conditions, or if they are fulfilled for both directions of trade at the same time, the direction for opening a position cannot be determined and no order will be executed.

It is important to know that the opening logic conditions determine the algorithm for long entry only and the software calculates the short entry rules using the same indicators but in reverse. You can still use strategies trading in only one direction but you will need to use the Long or Short indicator.

Examples

Opening Logic Strategy

With this strategy, entry orders will be sent at the price of Moving Average when both entry conditions are met at the same time, namely, the day of week is either Tuesday or Wednesday and ADX changes its direction upwards. A drawback with this strategy is the fact that both logic conditions are met for a short and for a long position at the same time. Thus, the program will send two entry orders - to open a long position and to open a short one, too.

When the market price reaches the entry point, the order for opening a long position will be executed. The order for opening a short position is to be executed at the same price. This second order comes as a result of an additional signal having a direction opposite to the direction of the open long position. The behaviour of the opposite direction signal, however, does not allow a change of position. Therefore, the order for opening a short position will be cancelled. This will happen every time an entry signal is sent, which means that opening a short position is practically impossible and the back test will be unreliable.

To solve the strategy's problem you need to add another entry filter that will specify the direction of entry:

Opening logic condition Money Flow

In that case, a position will be opened when the three logic conditions are met at the same time. The third condition will determine the direction of the position:

  • if Money Flow rises, a long position will be opened; or
  • if Money Flow falls, a short position will be opened.

Summary

  • The Opening logic conditions slots contain logic conditions which have two values - fulfilled or not fulfilled;
  • To open a position in a given direction, all the conditions need to be met;
  • The maximum number of the entry logic conditions is four;
  • If there are no logic conditions, or if they are fulfilled for a short and for a long position at the same time, the direction of the position is not determined;
  • A position opens at the price set in the Opening Point of the Position slot.