Difference between revisions of "Spread and Pair Trading"

From MultiCharts
Jump to navigation Jump to search
(Created page with "==Exchange Traded Spreads== In MC one is able to trade on a spread only if it is exchange traded spread and it is provided by your data vendor as a single separate instrument...")
 
Line 2: Line 2:
  
 
In MC one is able to trade on a spread only if it is exchange traded spread and it is provided by your data vendor as a single separate instrument that is added to QuoteManager database (see Adding Symbols to Database) and mapped correctly to the corresponding broker instrument in [[Symbol Mapping]] window. If there is no such instrument on data source end and at your broker, then it is not possible to trade exactly on spread.
 
In MC one is able to trade on a spread only if it is exchange traded spread and it is provided by your data vendor as a single separate instrument that is added to QuoteManager database (see Adding Symbols to Database) and mapped correctly to the corresponding broker instrument in [[Symbol Mapping]] window. If there is no such instrument on data source end and at your broker, then it is not possible to trade exactly on spread.
 +
 +
==Visual Spread on Chart==
 +
 +
To see a spread histogram of 2 instruments, one needs to plot a chart window with 2 symbols as data series 1 and data series 2. In the list of hour prebuilt studiesthere are 2 spread indicators that can be applied to such chart.
  
 
==Pair Trading==
 
==Pair Trading==
  
One can only send orders to buy or sell one or another instrument of a pair in MultiCharts, but to reach this goal the following system should be developed.
+
One can only send orders to buy or sell one or another instrument of a pair in MultiCharts, but to reach this goal the following system should be developed:
 +
* 2 separate chart windows should be plotted with both symbols of a pair on the charts.
 +
* On the first chart the symbol A should plotted on subchart 1. The symbol B should be plotted on subchart 2.
 +
* On the second chart the symbol B should plotted on subchart 1. The symbol A should be plotted on subchart 2.
 +
* On both charts the strategies should be applied that has similar but reversed logic to buy for 1st chart and to sell 2nd one (orders can be placed only on data series 1).
 +
 
 +
<div style="background-color: #E5F6FF;">'''Example''': When one of the pair is bought or sold, your strategy needs to know exactly what’s going on with both symbols. If your pair is Google and Microsoft, you would enter GOOG as symbol one and MSFT as symbol two on first chart. Then you would add MSFT as data one and GOOG as data two on second chart. On first chart when a condition on data 1 is met the strategy buys and at the same time when this very condition is met on the second data series of the second chart that strategy sells and vice versa. This way each instrument in the pair is actively referencing the other instrument—and you achieve complete synchronization. </div>
 +
 
 +
<br>
 +
There is also another, a more complex way to pair trade:
 
* 2 separate chart windows should be plotted. 1 symbol of a pair per chart.
 
* 2 separate chart windows should be plotted. 1 symbol of a pair per chart.
 
* 2 separate signals should be applied to each of the charts.
 
* 2 separate signals should be applied to each of the charts.

Revision as of 12:34, 22 March 2012

Exchange Traded Spreads

In MC one is able to trade on a spread only if it is exchange traded spread and it is provided by your data vendor as a single separate instrument that is added to QuoteManager database (see Adding Symbols to Database) and mapped correctly to the corresponding broker instrument in Symbol Mapping window. If there is no such instrument on data source end and at your broker, then it is not possible to trade exactly on spread.

Visual Spread on Chart

To see a spread histogram of 2 instruments, one needs to plot a chart window with 2 symbols as data series 1 and data series 2. In the list of hour prebuilt studiesthere are 2 spread indicators that can be applied to such chart.

Pair Trading

One can only send orders to buy or sell one or another instrument of a pair in MultiCharts, but to reach this goal the following system should be developed:

  • 2 separate chart windows should be plotted with both symbols of a pair on the charts.
  • On the first chart the symbol A should plotted on subchart 1. The symbol B should be plotted on subchart 2.
  • On the second chart the symbol B should plotted on subchart 1. The symbol A should be plotted on subchart 2.
  • On both charts the strategies should be applied that has similar but reversed logic to buy for 1st chart and to sell 2nd one (orders can be placed only on data series 1).
Example: When one of the pair is bought or sold, your strategy needs to know exactly what’s going on with both symbols. If your pair is Google and Microsoft, you would enter GOOG as symbol one and MSFT as symbol two on first chart. Then you would add MSFT as data one and GOOG as data two on second chart. On first chart when a condition on data 1 is met the strategy buys and at the same time when this very condition is met on the second data series of the second chart that strategy sells and vice versa. This way each instrument in the pair is actively referencing the other instrument—and you achieve complete synchronization.


There is also another, a more complex way to pair trade:

  • 2 separate chart windows should be plotted. 1 symbol of a pair per chart.
  • 2 separate signals should be applied to each of the charts.
  • Each signal script should use Global Variables in its script to pass values between the charts.
Example: When on first chart a particular condition for order generation is met and the strategy sends a market order to go 1 contract long, through Global Variables this strategy informs the other signal on the second chart to generate a market order to go 1 contract short.