forex software

Create and Test Forex Strategies

forex software

eas-guide:exit-rules

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
eas-guide:exit-rules [2018/01/30 12:57] yavoreas-guide:exit-rules [2018/01/31 09:48] yavor
Line 1: Line 1:
 ====== Exit Rules ====== ====== Exit Rules ======
  
-The Exit Rules are responsible for closing positions. There are only three possible points for closing a position: at Stop Loss, ay Take Profitand at Bar Open. Since the Stop Loss and Take Profit are part of the Expert Propertieswe will describe here only the Bar Open case. +The Exit Rules are responsible for closing positions. There are only three possible points for closing a position: at Stop Loss, at Take Profit and at Bar Open. Since the Stop Loss and Take Profit are part of the Expert Properties here we will describe only the Bar Open case.
- +
-Let's see several examples:+
  
 ===== No Exit Rule Indicators ===== ===== No Exit Rule Indicators =====
Line 16: Line 14:
 </WRAP> </WRAP>
  
-When you create a new expert, the program starts without Exit rule indicators and that is a perfectly valid exit condition. If there are no Exit rule indicators, EA Studio closes all positions at the next Bar Open. This is indicated in the info text area: Close at Bar Open. It means exactly that. If the EA opens a positionit will close it at the beginning of the next bar. This rule covers both long and short positions.+When you create a new strategy it will contain no Exit rules and that is a perfectly valid exit condition. If there are no Exit rules the strategy will close all positions at the next Bar Open. This is indicated by the text "Close a long position at Bar Open"This means that if the EA opens a position it will close it at the beginning of the next bar. This rule covers both long and short positions.
  
 ===== One Exit Rule Indicator ===== ===== One Exit Rule Indicator =====
  
-You can add Exit Rules indicators by using the "Add a new exit rulebutton at the bottom. You can't have more than two Exit Rules indicators so the button becomes inactive when this limit is reached. When you click the button, the program opens an Exit Rule Indicator panel at the left side of the Editor. You can choose an indicator there and set its Logic and parameters.+You can add Exit Rules indicators by using the **+ Add a new exit rule** button at the bottom of the Exit Rules list. You can't have more than two Exit Rules so the button becomes inactive when this limit is reached. When you click the button, the program opens an Exit Rule Indicator panel at the left side of the Editor. There you can choose an indicator and set its Logical condition and parameters.
  
-All of the indicators express logical condition that can either be fulfilled or not fulfilled. When creating a strategyyou should cover the Long trading case and the program will assume the reverse rules for the Short trades. In this sense the strategy uses symmetrical conditions for long and short positions. The general case is that the condition is fulfilled for a short position but not for a long one or vice versa. In some cases, the condition can be fulfilled in both directions of trade at the same time (when using ADX for example).+All of the indicators have Logical condition that can either be fulfilled or not fulfilled. When you create a strategy you should cover the Long trading cases and the program will mirror the long rules for the short trades as well. In other words the strategy uses symmetrical conditions for long and short positions. The general case is that the condition is fulfilled for a short position but not for a long one or vice versa. In some cases, the condition can be fulfilled in both directions of trade at the same time (when using ADX for example).
  
 <WRAP group> <WRAP group>
Line 35: Line 33:
 The example above shows one Exit Rule indicator – Bollinger Bands, with a logical rule: "The bar opens above Upper Band". The example above shows one Exit Rule indicator – Bollinger Bands, with a logical rule: "The bar opens above Upper Band".
  
-The condition "The bar opens above Upper Band" can be either true or false. If you have an open long position and it happens that the current bar opens above the upper Bollinger band, the expert will close that position at Bar Open with a market order.+The condition "The bar opens above Upper Band" can be either true or false. If you have an open long position and it happens that the current bar opens above the upper Bollinger band, the strategy will close that position at Bar Open with a market order.
  
 Let's now imagine that we have a short position and the bar also opens above the Upper band. The rule in the indicator slot is satisfied for a long position, but it is not satisfied for a short one because your rule for short positions follows the opposite logic. If we have to put it explicitly: close short when "The bar opens below the Lower Band". Because we are short and the exit rule doesn't allow closing short positions, the program leaves the position open for the next bar. Let's now imagine that we have a short position and the bar also opens above the Upper band. The rule in the indicator slot is satisfied for a long position, but it is not satisfied for a short one because your rule for short positions follows the opposite logic. If we have to put it explicitly: close short when "The bar opens below the Lower Band". Because we are short and the exit rule doesn't allow closing short positions, the program leaves the position open for the next bar.
  
-===== Two Exit Rules =====+===== Multiple Rules =====
  
-When there are more than one Exit Rules, the program closes a position at Bar Open when at least one of these rules is satisfied. This is a key difference between the Entry and the Exit Rules. The program is very sensitive when it decides to close a position. No matter how many exit rules we have, only one of them is enough to close the position. Of course if both conditions are fulfilled the position is also closed.+When there are multiple Exit Rules, the program closes a position at Bar Open when at least one of these rules is satisfied. This is a key difference between the Entry Rules and the Exit Rules. The program is very sensitive when it decides to close a position. No matter how many exit rules we have, only one of them is enough to close the position. Of course if both conditions are fulfilled the position is also closed.
  
 <WRAP group> <WRAP group>
Line 52: Line 50:
 </WRAP> </WRAP>
  
-Let's see a case when we have a long position and two Exit Rules. If the first of these is satisfied for a long position and the second one is satisfied for a short position. What do you think it will happen? The program will close the long position because a single signal for closing is enough, no matter what the second one is showing.+Let's see a case when we have a long position and two Exit Rules. If the first of these is satisfied for a long position and the second one is satisfied for a short position. What do you think it will happen? The program will close the long position because a single signal for closing is enough, no matter what the second one is.
  
 ~~DISQUS~~ ~~DISQUS~~