×

Sign up and get MultiCharts free

Use its powerful simulation mode with data included out of the box. Just fill out the form and start honing your trading skills with a few clicks.

Changes - MultiCharts

Changes

Jump to navigation Jump to search

BuyToCover

475 bytes added, 17:07, 19 February 2012
m
Completely or partially exits one or all of the short entries as specified by the parameters.
 
The exit point is visually indicated on a chart by an Arrow and a Tick. The Arrow identifies the time and the Tick identifies the price value of the exit point. Labels, displaying the exit name and the number of contracts or shares traded, are displayed below the Cover Arrow.
<div style="background-color: #FFE4E1;margin-bottom:10px;">An order is executed at the point specified by the parameters; if the order is not filled '''within ''' the specified bar, the order is '''cancelled'''. </div>
==== Usage ====<syntaxhighlight>BuyToCover[("ExitLabel")][From Entry("EntryLabel")][TradeSize[Total]]Exit</syntaxhighlight>
or:
<syntaxhighlight>Buy To Cover[("ExitLabel")][From Entry("EntryLabel")][TradeSize[Total]]Exit</syntaxhighlight>  Parameters inside the square brackets are optional  ==== Parameters ==== [[ExitLabel]] - an optional parameter; assigns a name that will be displayed in the name label above the exit  If [[ExitLabel]] is not specified, the name "Cover" will be used for the first exit, "Cover#2" for the second exit, "Cover#3" for the third exit, etc.
[[EntryLabel]] Parameters inside the square brackets are optional - an optional parameter; ties the exit to the particular entry that was assigned the [[EntryLabel]] name; the name must be preceded by the word [[Entryif these aren't defined,]] the word [[From]] default is a skip word and can be omitted used.
An == Parameters ==:'''ExitLabel''' - an optional parameter; assigns a name that will be displayed in the name label above the exit can only .::If '''ExitLabel''' is not specified, the name "Cover" will be tied to an entry within used for the first exit, "Cover#2" for the second exit, "Cover#3" for the same signalthird exit, etc. For more information, see [[SellShort]]
If :'''EntryLabel''' - an optional parameter; ties the exit to the particular entry that was assigned the '''EntryLabel''' name; the name must be preceded by the word [[Entry]]. The word [[From]] is a skip word and can be omitted.::An exit can only be tied to an entry within the same signal. For more information, see [[EntryLabelSellShort]] .::If '''EntryLabel''' is not specified, [[all]] of the open short entries will be closed.
[[:'''TradeSize]] ''' - an optional parameter; a numerical expression, specifying the number of contracts or shares to buy; the . The expression must be followed by one of the following transposable equivalent words: [[Share]], [[Shares]], [[Contract]] or [[Contracts]].::By default, the number of contracts or shares specified by the '''TradeSize''' parameter will be covered from ''each'' of the open short entries.::If '''TradeSize''' is followed by the word [[Total]] , only the number of contracts or shares specified by the '''TradeSize''' parameter will be covered, regardless of the number of open short entries. The contracts or shares will be covered in the same order they were shorted: ''First In, First Out''.::If '''TradeSize''' is not specified, the entire short position will be closed out.
By default, the number of contracts or shares specified by the [[TradeSize]] parameter will be covered from [[each]] of the open short entries.  If [[TradeSize]] is followed by the word [[Total,]] only the number of contracts or shares specified by the [[TradeSize]] parameter will be covered, regardless of the number of open short entries. The contracts or shares will be covered in the same order they were shorted: First In, First Out. If [[TradeSize]] is not specified, the entire short position will be closed out.  [['''Exit]] ''' - a required parameter; specifies the timing and price of exit. See the section below for more information about the four types of exits.
== Types of exits ==
There are four types of Exit:
=== Exit this bar on close ===<syntaxhighlight>This Bar[On]Close</syntaxhighlight>
Where: :'''On''' - is a [[On:Category:Skip_Words|skip word]] is a skip word and can be omitted.
A Cover Arrow will be placed at the current bar's [[Close]] tick.
=== Exit next bar at open ===<syntaxhighlight>Next Bar[At]Open </syntaxhighlight>or <syntaxhighlight>Next Bar[At]Market</syntaxhighlight>
Where: - words [[:Words '''"Market"]] ''' and [['''"Open"]] ''' are transposable. :'''At''' - a [[At:Category:Skip_Words|skip word]] is a skip word and can be omitted.
A Cover Arrow will be placed at the next bar's [[Open]] tick.
=== Exit next bar at limit ===<syntaxhighlight>Next Bar[At]Price Limit</syntaxhighlight>
Where: :'''Price''' - [[Price]] is a numerical expression, specifying the Limit Price. :'''At''' - a [[At:Category:Skip_Words|skip word]] is a skip word and can be omitted.
A Cover Arrow will be placed on the next bar at the first tick with a price value less than or equal to [[Price]] ; if there are no such ticks within the next bar, the order will be cancelled.
=== Exit next bar at stop ===<syntaxhighlight>Next Bar[At]Price Stop</syntaxhighlight> Where: :'''Price''' - [[Price]] is a numerical expression, specifying the Stop Price. :'''At''' - a [[At:Category:Skip_Words|skip word]]] is a skip word and can be omitted.
A Cover Arrow will be placed on the next bar at the first tick with a price value equal to or greater than the [[Price]] ; if there are no such ticks within the next bar, the order will be cancelled. ==== Example ==Examples ==
Completely exit all open short entries at Market price on close of this bar and label the exit "Complete Exit":
<syntaxhighlight>BuyToCover("Complete Exit")This Bar On Close;</syntaxhighlight>
Completely exit from the short position established by the entry labeled labelled "Original Entry", at Market price on open of next bar:
<syntaxhighlight>BuyToCover From Entry("Original Entry")Next Bar At Open;</syntaxhighlight>
Cover 10 shares of the short position established by the entry labeled labelled "Original Entry", at Market price on open of next bar:
<syntaxhighlight>BuyToCover Entry("Original Entry")10 Shares Next Bar At Market;</syntaxhighlight>
<syntaxhighlight>BuyToCover Next Bar 50 Stop;</syntaxhighlight>
 
 
[[Category:Strategy Orders]]

Navigation menu