Difference between revisions of "SetExitOnClose"

From MultiCharts
Jump to navigation Jump to search
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Closes out the current position at the Close tick of the last bar of the trading session on an intra-day chart; generates the appropriate Market exit order depending on whether the position is long or short.
+
Closes out the current position at the Close tick of the last bar of the trading session on an intra-day chart; generates the appropriate [[Market]] exit order depending on whether the position is [[Long]] or [[Short]].
SetExitOnClose function uses the session closing time specified in the session settings for the symbol in the QuoteManager.  
 
 
   
 
   
==== Usage ====
+
The '''SetExitOnClose''' function uses the session closing time specified in the [[Sessions|session]] settings for the symbol in the [[:Category:QuoteManager|QuoteManager]].
 +
 +
== Usage ==
 
<syntaxhighlight>SetExitOnClose</syntaxhighlight>  
 
<syntaxhighlight>SetExitOnClose</syntaxhighlight>  
 +
 +
== Notes ==
 +
* This function can only be used in signals.
 
   
 
   
==== Notes ====
+
== Example ==
This function can only be used in signals.
 
 
==== Example ====
 
 
Generate an exit order at the Close tick of the last bar of the trading session:  
 
Generate an exit order at the Close tick of the last bar of the trading session:  
  
 
<syntaxhighlight>SetExitOnClose;</syntaxhighlight>  
 
<syntaxhighlight>SetExitOnClose;</syntaxhighlight>  
 
   
 
   
 +
<div style="background-color: #E3FBE5;">Note: SetExitOnClose keyword that sends a market order at the close of the last bar of the session. In real-time trading, if the exchange where the symbol is traded does not have post-market session (or the broker does not support it), market order generated by SetExitOnClose keyword may be rejected </div>
  
 
[[Category:Strategy Orders]]
 
[[Category:Strategy Orders]]

Latest revision as of 14:26, 14 May 2012

Closes out the current position at the Close tick of the last bar of the trading session on an intra-day chart; generates the appropriate Market exit order depending on whether the position is Long or Short.

The SetExitOnClose function uses the session closing time specified in the session settings for the symbol in the QuoteManager.

Usage

SetExitOnClose

Notes

  • This function can only be used in signals.

Example

Generate an exit order at the Close tick of the last bar of the trading session:

SetExitOnClose;
Note: SetExitOnClose keyword that sends a market order at the close of the last bar of the session. In real-time trading, if the exchange where the symbol is traded does not have post-market session (or the broker does not support it), market order generated by SetExitOnClose keyword may be rejected