Difference between revisions of "SetBreakEven"

From MultiCharts
Jump to navigation Jump to search
m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Closes out the entire position or the entry if it is at the breakeven point after the profit has reached the specified value; generates the appropriate Stop order depending on whether the position is long or short.  
+
Closes out the entire position or the entry if it is at the break even point after the profit has reached the specified value; generates the appropriate [[Stop]] order depending on whether the position is Long or Short.  
  
[[SetStopPosition]] and [[SetStopContract]] or [[SetStopShare]] functions determine whether SetBreakEven will be applied to the entire position or to each contract or share individually; by default, SetBreakEven is applied to the entire position.  
+
[[SetStopPosition]] and [[SetStopContract]] or [[SetStopShare]] functions determine whether '''SetBreakEven''' will be applied to the entire position or to each contract or share individually; by default, '''SetBreakEven''' is applied to the entire position.  
  
SetBreakEven function is evaluated intra-bar and not only on close of a bar, and can exit within the same bar as the entry.  
+
<div style="background-color: #E3FBE5;margin-bottom:10px;">SetBreakEven function is evaluated intra-bar and not only on close of a bar, and can exit within the same bar as the entry.</div>
 
   
 
   
==== Usage ====
+
== Usage ==
 
<syntaxhighlight>SetBreakEven(Profit)</syntaxhighlight>  
 
<syntaxhighlight>SetBreakEven(Profit)</syntaxhighlight>  
  
Where: [[Profit]] - a numerical expression, specifying the currency value of the profit that must be reached first  
+
Where:  
 +
 
 +
:'''Profit''' - a numerical expression, specifying the currency value of the profit that must be reached first.
 
   
 
   
==== Notes ====  
+
== Notes ==
This function can only be used in signals.  
+
* This function can only be used in signals.  
 
+
* The '''SetBreakEven''' function does not factor in commissions or slippage.
SetBreakEven function does not factor in commissions or slippage.  
 
 
   
 
   
==== Example ====
+
== Examples ==
Generate an exit order for the entire position if it is at the breakeven point after position profit  
+
Generate an exit order for the entire position if it is at the breakeven point after position profit has reached $50:  
has reached $50:  
 
  
 
<syntaxhighlight>SetStopPosition;  
 
<syntaxhighlight>SetStopPosition;  
Line 23: Line 23:
 
SetBreakEven(50);</syntaxhighlight>  
 
SetBreakEven(50);</syntaxhighlight>  
  
Generate an exit order for the entry if it is at the breakeven point after per contract profit has
+
Generate an exit order for the entry if it is at the breakeven point after per contract profit has reached $10:  
reached $10:  
 
  
 
<syntaxhighlight>SetStopContract;  
 
<syntaxhighlight>SetStopContract;  
  
 
SetBreakEven(10);</syntaxhighlight>  
 
SetBreakEven(10);</syntaxhighlight>  
 
  
 
[[Category:Strategy Orders]]
 
[[Category:Strategy Orders]]

Latest revision as of 16:45, 19 February 2012

Closes out the entire position or the entry if it is at the break even point after the profit has reached the specified value; generates the appropriate Stop order depending on whether the position is Long or Short.

SetStopPosition and SetStopContract or SetStopShare functions determine whether SetBreakEven will be applied to the entire position or to each contract or share individually; by default, SetBreakEven is applied to the entire position.

SetBreakEven function is evaluated intra-bar and not only on close of a bar, and can exit within the same bar as the entry.

Usage

SetBreakEven(Profit)

Where:

Profit - a numerical expression, specifying the currency value of the profit that must be reached first.

Notes

  • This function can only be used in signals.
  • The SetBreakEven function does not factor in commissions or slippage.

Examples

Generate an exit order for the entire position if it is at the breakeven point after position profit has reached $50:

SetStopPosition; 

SetBreakEven(50);

Generate an exit order for the entry if it is at the breakeven point after per contract profit has reached $10:

SetStopContract; 

SetBreakEven(10);