Changes

Jump to navigation Jump to search

Getting Started with AutoTrading

15,633 bytes removed, 16:34, 23 February 2012
no edit summary
Implementing automated trade execution involves:
 
# Setting Up the Order Execution Gateway, and
# Setting Up Auto Trading in MultiCharts
 
<br>
== Setting Up the Order Execution Gateway ==
 
Please choose the order execution gateway and follow the instructions.
 
<br>
=== Setting Up FXCM ===
 
Please refer to FXCM's documentation.
 
<br>
=== Setting Up Interactive Brokers TWS ===
 
# Install a standalone version of Trader Workstation according to the instructions provided by Interactive Brokers.
# Start Trader Workstation and log in using a user name and password provided by Interactive Brokers.<br><br><div style="background-color: #F8F6CD;">Important: It is strongly recommended that automated order execution process is initially extensively tested using a '''Simulated Account'''. Testing strategies and automated order execution using a real account can result in a substantial financial loss! All Interactive Brokers clients with a real trading account also receive a simulated trading account that provides real-time data and enables traders to and test the functions and features of the Trader Workstation platform.</div><br>In addition, Interactive Brokers provides a '''Demo Account''' that is accessible by people who aren't clients. A demo account supports only some of the symbols, has limited historical data, and provides delayed quotes.<br><div style="background-color: #E5F6FF;">The user name is '''''edemo''''' and the password is '''''demouser'''''.</div>
# In Trader Workstation, click the '''Configure''' icon on the toolbar, or click '''Configure''' in the main menu.
# Click '''API''' and then select the '''Enable ActiveX and Socket Clients''' check box.
 
<br>
 
=== Setting Up Patsystems ===
 
Please refer to Patsystems' documentation.
 
<br>
=== Setting Up Rithmic 01 ===
 
Please refer to Rithmic's documentation.
 
<br>
=== Setting Up Rithmic Test ===
 
Please refer to Rithmic's documentation.
 
<br>
=== Setting Up Trading Technologies ===
 
Please refer to Trading Technologies' documentation.
 
<br>
=== Setting Up Zen-Fire ===
 
Please refer to Zen-Fire's documentation.
 
<br>
== Setting Up AutoTrading in MultiCharts ==
# Determine the symbol to plot on a chart. In QuoteManager, verify that that the '''Price Scale''', '''Min Movement''', and '''Big Point Value''' settings for the symbol are correct. MultiCharts will have the correct settings for most of the symbols, but it is not possible to cover every symbol. If these settings are not correct, then the chart will not plot properly and orders may be rejected by the execution gateway. To learn more, see [[<span style="color: red;">'''LINK'''</span> /101-01_SettingIndProp.html name=""; |Setting Properties]].
# Create a chart of the necessary symbol. To learn more, see [[<span style="color: red;">'''LINK'''</span> /22-0100_CreatingChart.html name=""; |Creating Charts]].# Add the necessary signals to the chart. To learn more, see [[<span style="color: red;">'''LINK'''</span> /0270_Indicators/22-7000_Studies.html name=""; |Using Studies]].# Set signal and strategy properties. To learn more, see [[<span style="color: red;">'''LINK'''</span> /0270_Indicators/22-7006_SignalSettings.html name=""; |Signal Settings]] and [[<span style="color: red;">'''LINK'''</span> /0280_Backtesting/22-8003_StrategyProp.html name=""; |Strategy Properties]].
# Open the '''Strategy Properties''' window.<br><br>To open the '''Strategy Properties''' window:
## Open the '''Format Objects''' window.<br><span>{{FormatObjectIS}}</span>
## Click the '''Test''' button to test the alert.
## Select '''Play Once''' or '''Repeat''' for the alerts to be played once or repeatedly, respectively.
# In the '''Mode Selection''' section, there are two options: synchronous and asynchronous [[<span style="color: red;">'''LINK'''</span> /0295_AutoTrading/02-9501_AT_Understanding.html name=""; Understanding Automated Trade Execution|mode]].
## Select '''Entries/Exits are based on the execution confirmation by the broker (Sync) ''' option for synchronous auto trading mode (SA).
## Select '''Entries/Exits are independent of the execution confirmation by the broker (Async)''' option in the '''Mode Selection''' section for Asynchronous auto trading mode (AA). If AA is selected, two group boxes become available.<br><br>
#: This feature gives the strategy the ability to automatically convert limit orders or stop orders into market orders after a certain period of time.
#:* Select '''Convert unexecuted limit or stop entry orders to market orders''' check box to convert unexecuted limit or stop entry orders to market after a specified number of seconds. Enter the number of seconds in the list box.
#:* Select '''Convert unexecuted limit or stop exit orders to market orders''' check box to convert unexecuted limit or stop exit orders to market after a specified number of seconds. Enter the number of seconds in the list box.<br><div style="background-color: #E3FBE5;">Note: The waiting period for converting unfilled limit or stop orders to market orders must be less than the duration of a single bar.</div><br><div style="background-color: #E3FBE5;">Note: As long as the order is completely unfilled, MultiCharts will always convert the order as described in this step regardless of any settings under '''Replace to Market Partially Filled Orders'''. If there is a partially filled order and '''Replace to Market Partially Filled Orders''' was turned on, then MultiCharts will convert the order according to the settings in '''Replace to Market Partially Filled Orders'''.</div><br><br>
#:'''''Assign the Initial Market Position at the Broker Settings'''''
#:To learn more, see [[<span style="color: red;">'''LINK'''</span> /0295_AutoTrading/02-9503_AT_Working.html name="10"; |Synchronization of Market Position in Auto Trading Mode]].
#::* Select '''Assume the initial market position at the broker the SAME AS on the CHART''' to set the initial position to the position that's on the chart.<br>
#::<div style="background-color: #E3FBE5;">Note: Synchronization of the Market Position in the Auto Trading Mode may not work correctly if pyramiding was used in the strategy. It may also not work correctly if more than one active entry was generated on a chart when auto trading is launched. The reason for this limitation is that dialog window is set up to define only one active entry.</div>
# Choose the broker/gateway from the list box in the '''Select Broker Plug-in''' section.
# Click '''Settings'''.
# Input the settings for the appropriate broker/gateway.<br>#* '''Broker Plug-In Settings for FXCM'''<br><br>#** '''''Account Settings Tab:'''''<br>Please get the Login, Password, and Account information from the broker. In the '''Connection''' setting, select Demo to connect to the demo account or Real to the real trading account.<br><div stylecategorytree mode="background-color: #E3FBE5;">Note: Due to FXCM's restrictions, MultiCharts will not send limit or stop orders to FXCM. All limit or stop orders will be sent as market orders.</div><br>#** '''''Symbol Dictionary Tab:'''''<br>If the data source is different from the execution gateway, it is possible that they do not use the same symbol for the same contract. In this situation, the chart, because it is plotted from the data source, will send an order using the data source’s symbol. The execution gateway will not understand the data source’s symbol and will reject the signal. Symbol Dictionary solves this problem by matching the symbol from the data source to the symbol from the execution gateway. The table has two columns. Input the symbol from the data source under the Chart column. Input the symbol from FXCM under the Currency Column.<br><br>#* '''Broker Plug-In Settings for Interactive Brokers TWS'''<br><br>#** '''''General:'''''<br>By default, MultiCharts disables auto trading immediately if connection with the execution gateway is lost. However, in some cases, short interruptions can be acceptable because it doesn’t affect the strategy. The disconnection may also be a scheduled disconnection by the execution gateway, and the intention is to have auto trading on when the connection is reestablished. pages The '''Connection''' setting keeps auto trading on unless the disconnection lasts longer than the time period specified.<br>When TWS loses its connection with MultiCharts while auto trading is on, MultiCharts will try to reconnect with TWS every 10 seconds until the connection is established or auto trading is turned off.<br><div styleshowcount="background-color: #E3FBE5;">Note: If TWS is closed, MultiCharts cannot start TWS and automatically log into TWS for the user.</div><br>MultiCharts will not reconnect with TWS in the following scenarios:#*** Interactive Brokers is used only as the broker and another provider is used as the data feed#*** The strategy sent an order while TWS was disconnected<br><br>#** '''''IB Settings Tab:'''''<br>The '''Server''', '''Port''', and '''ClientID''' settings under the IB Settings tab are detected automatically. The settings need to be changed only if Trader Workstation and MultiCharts are running on different computers. For the correct settings consult the system administrator.<br>The '''Order Settings''' section is for specifying Time in Force, Settling Firm, Clearing Account, and All or None Execution settings for the orders. Time in Force determines the life span of the order before the order is cancelled. The Settling Firm and Clearing Account fields are institutional settings. Institutional account holders should contact the broker for the correct settings. All or None Execution determines whether partial fills in entry and exit orders are permitted.<br><br>#** '''''Symbol Dictionary Tab:'''''<br>If the data source is different from the execution gateway, it is possible that they do not use the same symbol for the same contract. In this situation, the chart, because it is plotted from the data source, will send an order using the data source’s symbol. The execution gateway will not understand the data source’s symbol and will reject the signal. Symbol Dictionary solves this problem by matching the symbol from the data source to the symbol from the execution gateway.<br><br>To map a symbol:#*# Click '''Add''' to add a symbol. A new row will be created. The name of the symbol from the data source will populate the '''Chart''' column.#*# Enter the root of the symbol that the execution gateway uses in the '''Underlying''' column.#*# Enter the exchange name that the execution gateway uses in the '''Exchange''' column.#*# Enter the expiration date in the format that the execution gateway uses in the '''Expiry''' column. (This field is only required for Futures and Options). #*# Enter the currency in the format that the execution gateway uses in the '''Currency''' column.#*:: '''Example:'''<br>#*:: <tt>Symbol: '''ES #F'''<br>#*:: Underlying: ES<br>#*:: Exchange: GLOBEX<br>#*:: Expiry: 200806<br>#*:: Currency: USD</tt><br>#*:The above Symbol Dictionary example maps the eSignal ES #F (S&P E-mini Future Continuous Contract) symbol to the ES June 2008 contract from Interactive Brokers TWS.<br><br><div style="background-color: #F8F6CD;">Important: Make sure that the format is YYYYMMDD. The format YYYYMM will not work for all symbols.</div><div styledepth="background-color: #F8F6CD;"2>Important: To find the expiration date, right click on the symbol in TWS and select Contract Info.</div><br>#** '''''Financial Advisor Settings Tab''''':<br>Interactive Brokers TWS offers a possibility of trading multiple sub-accounts using a single main account. Financial Advisor Settings are optional and can be left blank. Consult Interactive Brokers for information on appropriate settings.<br><br>#* '''Broker Plug-In Settings for Patsystems'''ins<br><br>#** '''''Connection Settings Tab:'''''<br>Check '''Demo Mode''' to use local simulation. Leave it unchecked to connect to the broker.<br>For '''Common Settings''', please contact the broker for the Login and Password fields. <br>In the License field, enter '''FBD653F002'''. <br>In the Environment selection box, select '''Client''' to connect to the real trading account, or '''Test''' to connect to a test account. <br>The Application ID is '''MultiCharts'''. The application version is automatically detected by MultiCharts.<br>For '''Transport Settings''', please get the information from the broker.<br>For '''SSL Settings''', please get the information from the broker.<br><br/categorytree>By default, MultiCharts disables auto trading immediately if connection with the execution gateway is lost. However, in some cases, short interruptions can be acceptable because it doesn't affect the strategy. The disconnection may also be a scheduled disconnection by the execution gateway, and the intention is to have auto trading on when the connection is reestablished. The '''Reconnection Settings''' keeps auto trading on unless the disconnection lasts longer than the time period specified.<br><br>#** '''''Symbol Mapping Tab:'''''<br>If the data source is different from the execution gateway, it is possible that they do not use the same symbol for the same contract. In this situation, the chart, because it is plotted from the data source, will send an order using the data source's symbol. The execution gateway will not understand the data source's symbol and will reject the signal. Symbol Mapping solves this problem by matching the symbol from the data source to the symbol from the execution gateway. <br><br>In the '''Chart''' field, input the symbol from the data source. <br>Under '''Patsystems Symbol''' settings, input the '''Exchange''', '''Contract Name''', and '''Contract Date''' in the format acceptable by Patsystems. <br>Click the '''Lookup''' button to find the correct information.<br><br>#** '''''Trading Accounts Tab:'''''<br> Click '''Check for Accounts''' to locate the account.<br> Select the account by using the '''Account''' drop-down list.<br><br>#** '''''Order Settings Tab:'''''<br>Select the '''Time in Force'''. Time in Force determines the life span of the order before the order is cancelled.<br><br>#* '''Broker Plug-In Settings for Rithmic 01'''<br><br>#** '''''Connection Settings Tab:'''''<br>Under the '''Authority''' section, enter the '''Login''' and '''Password''' received from the broker. <br>The '''SSL Certificates Path''' will be automatically inputted. <br>Please do not change it unless instructed by the broker.<br>By default, MultiCharts disables auto trading immediately if connection with the execution gateway is lost. <br>However, in some cases, short interruptions can be acceptable because it doesn't affect the strategy. The disconnection may also be a scheduled disconnection by the execution gateway, and the intention is to have auto trading on when the connection is reestablished. <br>The '''Connection Settings''' keeps auto trading on unless the disconnection lasts longer than the time period that specified.<br><br>#** '''''Order Settings Tab:'''''<br>Enter the Account information.<br>Select the '''Time in Force'''. Time in Force determines the life span of the order before the order is cancelled.<br><br>#** '''''Symbol Dictionary Tab:'''''<br>If the data source is different from the execution gateway, it is possible that they do not use the same symbol for the same contract. In this situation, the chart, because it is plotted from the data source, will send an order using the data source’s symbol. The execution gateway will not understand the data source's symbol and will reject the signal. Symbol Dictionary solves this problem by matching the symbol from the data source to the symbol from the execution gateway.<br>In the Chart column, input the symbol from the data source. <br>Under the '''Ticker''' and '''Exchange''' columns, input the ticker and exchange in the format acceptable by Rithmic 01.<br><br>#* '''Broker Plug-In Settings for Rithmic Test'''<br><br>#*: Rithmic Test is the test account for Rithmic Trader. #*: The test account is on a different server, so it has its own connectivity settings. The other settings are the same as '''''Rithmic 01'''''. <br>Please see the instructions for '''''Rithmic 01'''''.<br><br>#* '''Broker Plug-In Settings for Trading Technologies'''<br><br>#** '''''Connection Settings Tab:'''''<br>Set the '''Server IP''', '''Order Connection Settings''', and '''Price Connection Settings''' from the broker.<br>By default, MultiCharts disables auto trading immediately if connection with the execution gateway is lost. However, in some cases, short interruptions can be acceptable because it doesn’t affect the strategy. The disconnection may also be a scheduled disconnection by the execution gateway, and the intention is to have auto trading on when the connection is reestablished. The '''Reconnection Settings''' keeps auto trading on unless the disconnection lasts longer than the time period specified.<br><br>#** '''''Symbol Dictionary Tab:'''''<br>If the data source is different from the execution gateway, it is possible that they do not use the same symbol for the same contract. In this situation, the chart, because it is plotted from the data source, will send an order using the data source’s symbol. The execution gateway will not understand the data source’s symbol and will reject the signal. Symbol Dictionary solves this problem by matching the symbol from the data source to the symbol from the execution gateway.<br>In the '''Chart''' field, input the symbol from the data source. In the '''Trading Technologies Symbol''' settings, input the symbol name, exchange, expiry date, and category in a format acceptable by Trading Technologies. Click on the '''Lookup''' button to look up the info.<br><br>#** '''''Order Settings Tab:'''''<br>Select the '''Time in Force'''. Time in Force determines the life span of the order before the order is cancelled.<br><br>#* '''Broker Plug-In Settings for Zen-Fire'''<br><br>#** '''''Connection Settings Tab:'''''<br>Under the '''Authority''' section, get the '''Login''' and '''Password''' from the broker. The '''SSL Certificates Path''' will be automatically inputted. Please do not change it unless instructed by the broker.<br>By default, MultiCharts disables auto trading immediately if connection with the execution gateway is lost. However, in some cases, short interruptions can be acceptable because it doesn’t affect the strategy. The disconnection may also be a scheduled disconnection by the execution gateway, and the intension is to have auto trading on when the connection is reestablished. The '''Connection Settings''' keeps auto trading on unless the disconnection lasts longer than the time period specified.<br><br>#** '''''Order Settings Tab:'''''<br>Input the '''Account''' info.<br>Select the '''Time in Force'''. Time in Force determines the life span of the order before the order is cancelled.<br><br>#** '''''Symbol Dictionary Tab:'''''<br>If the data source is different from the execution gateway, it is possible that they do not use the same symbol for the same contract. In this situation, the chart, because it is plotted from the data source, will send an order using the data source’s symbol. The execution gateway will not understand the data source's symbol and will reject the signal. Symbol Dictionary solves this problem by matching the symbol from the data source to the symbol from the execution gateway.<br>In the '''Chart''' column, input the symbol from the data source. Under the '''Ticker''' and '''Exchange''' columns, input the ticker and exchange in the format acceptable by Zen-Fire.<br><br>
# Turn on auto trading. There are two ways to do this.
#* Turning on auto trading on the chart

Navigation menu