forex software

Create and Test Forex Strategies


strategies:demo-03-closing-logic-conditions

Demo 03 Closing Logic Conditions

Demo 03 Closing Logic Conditions

Author's Description

This strategy is for demonstrational purposes only and real-time trading is not advised.

This strategy contains two logical rules for entering a position and two for closing a position.

The closing rules are in the two slots named as “Closing Logic Condition”. Each of them can be either satisfied or not satisfied. The specific thing to note is that the software will close our existing position even if only one of the exit conditions is satisfied (regardless of the other). Therefore, exiting a position is different from entering where ALL of the conditions must be satisfied for the software to send a buy/sell order.

In this particular example we’ll enter long at the beginning if the bar when both of the following conditions are satisfied:

  1. Balance of Power is greater than zero; AND
  2. Money Flow Index is greater than 50.

If any of the following two conditions is satisfied the program will close our position at the end of the bar:

  1. Balance of Power is lower than zero; OR
  2. Money Flow Index is less than 50.

If neither of these conditions is satisfied than the position will not close and will continue in the next bar.

The software will automatically calculate the logic for entering short based on our long entry rules we’ve set. Basically the opposite logic to the one set in the “Opening Logic Condition” applies:

  1. Balance of Power is lower than zero; AND
  2. Money Flow Index is less than 50.

The closing of the short position (like the closing of long ones) will happen if any of the set conditions is satisfied but this time the logic will be opposite to the one set in the fields because the closing rules we set apply for long positions only. That is why the program will automatically apply the opposite rules for closing short position (as it does for the opening conditions too):

  1. Balance of Power is greater than zero: OR
  2. Money Flow Index is more than 50.

It is also very important to know that the closing conditions are only available when we close a position at the end of a bar. That means we have to use “Closing Point of the Position” set to “Bar Closing” if we want to use such kind of conditions.

Forex Strategy Trader will allow you to set a maximum of two closing conditions.

If no exit conditions are selected the software will close any opened position when the price set in the “Closing Point of the Position” is reached. If however, there is even a single condition selected, the software will first check whether that condition is satisfied and if so it will then close the position.

Generated Description

Opening (Entry Signal)

Open a new long position at the beginning of the bar when all the following logic conditions are satisfied:

  • the Balance of Power* (Simple, 14) is higher than the zero line; and
  • the Money Flow Index* (14) is higher than the Level 50.

Open a new short position at the beginning of the bar when all the following logic conditions are satisfied:

  • the Balance of Power* (Simple, 14) is lower than the zero line; and
  • the Money Flow Index* (14) is lower than the Level 50.

Closing (Exit Signal)

Close an existing long position at the end of the bar when at least one of the following logic conditions is satisfied:

  • the Balance of Power (Simple, 14) is lower than the zero line; or
  • the Money Flow Index (14) is lower than the Level 50.

Close an existing short position at the end of the bar when at least one of the following logic conditions is satisfied:

  • the Balance of Power (Simple, 14) is higher than the zero line; or
  • the Money Flow Index (14) is higher than the Level 50.

Handling of Additional Entry Signals

Entry signal in the direction of the present position:

  • No averaging is allowed. Cancel any additional orders which are in the same direction.

Entry signal in the opposite direction:

  • No modification of the present position is allowed. Cancel any additional orders which are in the opposite direction.

Trading Size

Always trade a constant number of lots.

  • Opening of a new position - 1 lot.

Permanent Protection

The strategy doesn't use a Permanent Stop Loss.

The strategy doesn't use a Permanent Take Profit.


* Use the indicator value from the previous bar for all asterisk-marked indicators!