Difference between revisions of "Getting Started with AutoTrading"

From MultiCharts
Jump to navigation Jump to search
(34 intermediate revisions by 8 users not shown)
Line 1: Line 1:
Implementing automated trade execution involves:
+
== Setting Up Auto Trading in MultiCharts ==
  
# Setting Up the Order Execution Gateway, and
+
# 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 [[Setting Properties]].
# Setting Up Auto Trading in MultiCharts
+
# Create a chart of the necessary symbol.  To learn more, see [[Creating Charts]].
 
+
# Add the necessary signals to the chart.  To learn more, see [[Using Studies]].
<br>
+
# Set signal and strategy properties.  To learn more, see [[Signal Settings]] and [[Strategy Properties]].
== 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 '''Strategy Properties''' window.<br><br>To open the '''Strategy Properties''' window:  
 
## Open the '''Format Objects''' window.<br><span>{{FormatObjectIS}}</span>
 
## Open the '''Format Objects''' window.<br><span>{{FormatObjectIS}}</span>
Line 64: Line 14:
 
# Select the '''Show order execution status''' check box to have a status message displayed every time an order is sent, canceled, filled, or rejected, or any other informational message is received from the gateway application.  
 
# Select the '''Show order execution status''' check box to have a status message displayed every time an order is sent, canceled, filled, or rejected, or any other informational message is received from the gateway application.  
 
# Select the '''Audio Alert''' check box and choose a sound file to activate an audio alert every time a notification window appears.   
 
# Select the '''Audio Alert''' check box and choose a sound file to activate an audio alert every time a notification window appears.   
#: To learn more, see [[<span style="color: red;">'''LINK'''</span> Selecting an Alert Sound File]]
 
 
#: Selecting an Alert Sound File:
 
#: Selecting an Alert Sound File:
 
## Enter the path and name of the wave (.wav) sound file to be used into the '''File''' text box, or click the '''...''' http://www.multicharts.com/img/wiki/portfolio/ellipse.gif button on the right side of the text box for '''Open''' dialog box, navigate to and select a sound file, and click the '''Open''' button.  
 
## Enter the path and name of the wave (.wav) sound file to be used into the '''File''' text box, or click the '''...''' http://www.multicharts.com/img/wiki/portfolio/ellipse.gif button on the right side of the text box for '''Open''' dialog box, navigate to and select a sound file, and click the '''Open''' button.  
 
## Click the '''Test''' button to test the alert.  
 
## Click the '''Test''' button to test the alert.  
 
## Select '''Play Once''' or '''Repeat''' for the alerts to be played once or repeatedly, respectively.  
 
## 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="";  |mode]].
+
# In the '''Mode Selection''' section, there are two options: synchronous and asynchronous [[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 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>
 
## 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>
Line 75: Line 24:
 
#: This feature gives the strategy the ability to automatically convert limit orders or stop orders into market orders after a certain period of time.
 
#: 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 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>
+
#:* 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'''''
 
#:'''''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]].
+
#:To learn more, see [[Auto_Trading#Assign the Initial Market Position at the Broker Settings|Synchronization of Market Position in Auto Trading Mode]].
#:* Select '''Show the Assign the Initial Market Position at the Broker''' radio button to display a dialog box to input the initial position and average entry price.  This dialog box will appear when auto trading is turned on in the chart (see last step).
+
#:* Select '''Flat''' to set the initial position to 0.
#:* Select '''Do not show the Assign the Initial Market Position at the Broker''' radio button to set the initial position here instead of in the dialog box.<br>There are two choices:
+
#:* Select '''From Chart''' to set the initial position to the position that's on the chart.
#::* Select '''Assume the initial market position at the broker FLAT''' to set the initial position to 0.
+
#:* Select '''From Broker''' to set the initial position the same as actual position at the broker.
#::* 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>
+
#:* Select '''Always show dialogue window''' to display a dialog box to input the initial position and average entry price.  This dialog box will appear when auto trading is turned on in the chart (see last step).
#::<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>
+
#:* Select '''Show dialogue window only if market position on chart is different from broker''' to display a dialog box to input the initial position only when there is a difference between chart position and broker position.
# Choose the broker/gateway from the list box in the '''Select Broker Plug-in''' section.
+
# Choose the broker/gateway from the list box in the ''''''[[Auto Trading#Select Broker Plug-in|Broker Plug-ins]]'''''' section.  
 
# Click '''Settings'''.
 
# Click '''Settings'''.
 
# Input the settings for the appropriate broker/gateway.
 
# Input the settings for the appropriate broker/gateway.
#* '''Broker Plug-In Settings for FXCM'''<br><br>
+
<categorytree mode=pages showcount="on" depth=2>Broker Plug-ins</categorytree>
#** '''''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 style="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><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>
+
== Turning on Auto Trading in MultiCharts ==
#* '''Broker Plug-In Settings for Interactive Brokers TWS'''<br><br>
+
#Turning on auto trading on the chart
#** '''''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.  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 style="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:
+
#* SA Mode
#*** Interactive Brokers is used only as the broker and another provider is used as the data feed
+
#*# Select the [[Auto_Trading#Distinguished Features of Auto Trading|Auto Trading Status Switch]] and select '''Automate Order Execution'''.
#*** The strategy sent an order while TWS was disconnected<br><br>
+
#*# Make sure that the proper Broker Plug-in is selectedYou can click on the name to access it's properties. If the wrong Broker Plug-in is selected, then please click '''No''', and select the correct one in Auto Trading settings.
#** '''''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>
+
#*# Read the disclaimer and click '''Yes'''.
#** '''''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:
+
#*# The button will turn green which means auto trading is on.
#*# 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.
+
#* AA Mode
#*# Enter the root of the symbol that the execution gateway uses in the '''Underlying''' column.
+
#*# Select the [[Auto_Trading#Distinguished Features of Auto Trading|Auto Trading Status Switch]] and select '''Automate Order Execution'''.
#*# Enter the exchange name that the execution gateway uses in the '''Exchange''' column.
+
#*# Make sure that the proper Broker Plug-in is selected.  You can click on the name to access it's properties. If the wrong Broker Plug-in is selected, then please click '''No''', and select the correct one in Auto Trading settings.
#*# 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).
+
#*# Read the disclaimer and click '''Yes'''.
#*# Enter the currency in the format that the execution gateway uses in the '''Currency''' column.
+
#*# If '''Show the Assign the Initial Market Position at the Broker dialogue''' was selected earlier, then a dialog box will appear.<br>Enter the initial market position and average entry price. Then select '''Yes'''.
#*:: '''Example:'''<br>
+
#*# The button will turn green which means auto trading is on.
#*:: <tt>Symbol:  '''ES #F'''<br>
+
#Turning on auto trading from main menu
#*:: Underlying: ES<br>
+
#* SA Mode
#*:: Exchange:  GLOBEX<br>
+
#*# Select '''Format''' from the main menu.
#*:: Expiry:    200806<br>
+
#*# Select '''Automate Order Execution'''.
#*:: Currency:  USD</tt><br>
+
#*# Click on the switch and select '''Automate Order Execution'''.
#*: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 YYYYMMDDThe format YYYYMM will not work for all symbols.</div><div style="background-color: #F8F6CD;">Important: To find the expiration date, right click on the symbol in TWS and select Contract Info.</div><br>
+
#*# Make sure that the proper Broker Plug-in is selected.  You can click on the name to access it's properties. If the wrong Broker Plug-in is selected, then please click '''No''', and select the correct one in Auto Trading settings.
#** '''''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>
+
#*# Read the disclaimer and click '''Yes'''.
#* '''Broker Plug-In Settings for Patsystems'''<br><br>
+
#*# The button will turn green which means auto trading is on.
#* '''Broker Plug-In Settings for Rithmic 01'''<br><br>
+
#* AA Mode
#* '''Broker Plug-In Settings for Rithmic Test'''<br><br>
+
#*# Select '''Format''' from the main menu.
#* '''Broker Plug-In Settings for Trading Technologies'''<br><br>
+
#*# Select '''Automate Order Execution'''.
#* '''Broker Plug-In Settings for Zen-Fire'''<br><br>
+
#*# Click on the switch and select '''Automate Order Execution'''.
# Turn on auto trading. There are two ways to do this.
+
#*# Make sure that the proper Broker Plug-in is selected.  You can click on the name to access it's properties. If the wrong Broker Plug-in is selected, then please click '''No''', and select the correct one in Auto Trading settings.
#* Turning on auto trading on the chart
+
#*# Read the disclaimer and click '''Yes'''.
#** SA Mode
+
#*# If '''Show the Assign the Initial Market Position at the Broker dialog''' was selected earlier, then the dialog box will appear.  Input the initial market position and average entry price.  Then select '''Yes'''.
#**# Select the [[<span style="color: red;">'''LINK'''</span> /0295_AutoTrading/02-9503_AT_Working.html name="11";  |Auto Trading Status Switch]] and select '''Automate Order Execution'''.
+
#*# The button will turn green which means auto trading is on.
#**# Read the disclaimer and click '''Yes'''.
+
 
#**# The button will turn green which means auto trading is on.
+
 
#** AA Mode
+
== Turning off Auto Trading in MultiCharts ==
#**# Select the [[<span style="color: red;">'''LINK'''</span> /0295_AutoTrading/02-9503_AT_Working.html name="11";  |Auto Trading Status Switch]] and select '''Automate Order Execution'''.
+
#Turning off auto trading from the chart
#**# Read the disclaimer and click '''Yes'''.
+
#*# Select the [[Auto_Trading#Distinguished Features of Auto Trading|Auto Trading Status Switch]] and deselect '''Automate Order Execution'''.
#**# If '''Show the Assign the Initial Market Position at the Broker dialogue''' was selected earlier, then a dialog box will appear.<br>Enter the initial market position and average entry price. Then select '''Yes'''.
 
#**# The button will turn green which means auto trading is on.
 
#* Turning on auto trading from main menu
 
#** SA Mode
 
#**# Select '''Format''' from the main menu.
 
#**# Select '''Automate Order Execution'''.
 
#**# Click on the switch and select '''Automate Order Execution'''.
 
#**# Read the disclaimer and click '''Yes'''.
 
#**# The button will turn green which means auto trading is on.
 
#** AA Mode
 
#**# Select '''Format''' from the main menu.
 
#**# Select '''Automate Order Execution'''.
 
#**# Click on the switch and select '''Automate Order Execution'''.
 
#**# Read the disclaimer and click '''Yes'''.
 
#**# If '''Show the Assign the Initial Market Position at the Broker dialog''' was selected earlier, then the dialog box will appear.  Input the initial market position and average entry price.  Then select '''Yes'''.
 
#**# The button will turn green which means auto trading is on.
 
# Turn off auto trading. There are two ways to do this.
 
#* Turning off auto trading from the chart
 
#*# Select the [[<span style="color: red;">'''LINK'''</span> /0295_AutoTrading/02-9503_AT_Working.html name="11";  |Auto Trading Status Switch]] and deselect '''Automate Order Execution'''.
 
 
#*# If there are orders pending, a dialog box will appear to ask if pending orders should be cancelled.  Select '''Cancel Orders''' or '''Do Not Cancel Orders''' to proceed.
 
#*# If there are orders pending, a dialog box will appear to ask if pending orders should be cancelled.  Select '''Cancel Orders''' or '''Do Not Cancel Orders''' to proceed.
 
#*# If there are open positions, a dialog box will appear to ask if open positions should be closed.  Select '''Close Positions''' or '''Do Not Close Positions''' to proceed.
 
#*# If there are open positions, a dialog box will appear to ask if open positions should be closed.  Select '''Close Positions''' or '''Do Not Close Positions''' to proceed.
 
#*# The Auto Trading Status Switch will turn gray which means auto trading is turned off.
 
#*# The Auto Trading Status Switch will turn gray which means auto trading is turned off.
#* Turning off auto trading from the main menu
+
#Turning off auto trading from the main menu
 
#*# Select '''Format''' and deselect '''Automate Order Execution'''.
 
#*# Select '''Format''' and deselect '''Automate Order Execution'''.
 
#*# If there are orders pending, a dialog box will appear to ask if pending orders should be cancelled.  Select '''Cancel Orders''' or '''Do Not Cancel Orders''' to proceed.
 
#*# If there are orders pending, a dialog box will appear to ask if pending orders should be cancelled.  Select '''Cancel Orders''' or '''Do Not Cancel Orders''' to proceed.
 
#*# If there are open positions, a dialog box will appear to ask if open positions should be closed.  Select '''Close Positions''' or '''Do Not Close Positions''' to proceed.
 
#*# If there are open positions, a dialog box will appear to ask if open positions should be closed.  Select '''Close Positions''' or '''Do Not Close Positions''' to proceed.
 
#*# The Auto Trading Status Switch will turn gray which means auto trading is turned off.
 
#*# The Auto Trading Status Switch will turn gray which means auto trading is turned off.
 +
 +
== Enabling and Disabling Auto Trading on Multiple Charts ==
 +
Since MultiCharts 14 it is possible to enable automated trading on all charts from all of the currently open MultiCharts desktops.<br>
 +
To ''turn on'' auto trading on several charts:
 +
# Select '''Format''' from the main menu.
 +
# Click '''Enable Automated Order Execution for Multiple Charts'''.
 +
Or
 +
# From the '''Main''' toolbar select the '''Enable Automated Order Execution for Multiple Charts option'''.
 +
 +
In the opened up window put the checkmark next to the strategies/workspaces/desktops that you would like to enable.
 +
The window displays the essential information about the signals applied to each chart, the selected mode of trading (SA or AA), the selected broker plugin and the [[Auto_Trading#Assign_the_Initial_Market_Position_at_the_Broker_Settings|Assign the Initial Position]] option.<br>
 +
 +
To ''turn off'' auto trading on several charts:
 +
# Select '''Format''' from the main menu.
 +
# Click '''Disable Automated Order Execution for Multiple Charts'''.
 +
Or
 +
# From the '''Main''' toolbar select the '''Disable Automated Order Execution for Multiple Charts''' option.
 +
 +
== Managing Active Orders and Open Positions ==
 +
 +
If you do not want to see the pending orders dialog box when disabling auto trading select '''File''' in the main menu, click '''Preferences''', select the '''Trading''' tab and check the '''Do not show cancel active orders confirmation dialog when disabling auto trading''' check box.
 +
 +
There are two options available:
 +
*Cancel active orders sent by the strategy;
 +
*Do not cancel active orders sent by the strategy.
 +
 +
If you do not want to see the open position dialog box when disabling auto trading select '''File''' in the main menu, click '''Preferences''', select the '''Trading''' tab and check the '''Do not show close open position confirmation dialog when disabling auto trading''' check box.
 +
 +
There are two options available:
 +
*Close the open position opened by the strategy;
 +
*Do not close the open position opened by the strategy.
 +
 +
<div style="background-color: #E3FBE5;">Note: If the workspace (or MultiCharts) was closed while auto trading mode was enabled on one or several charts, a dialogue asking you if you want to enable auto trading on these charts on restart. Click '''Yes''' to enable auto trading or '''No''' to open charts with auto trading disabled.</div>
  
 
[[Category:AutoTrading]]
 
[[Category:AutoTrading]]

Revision as of 14:11, 11 October 2021

Setting Up Auto Trading in MultiCharts

  1. 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 Setting Properties.
  2. Create a chart of the necessary symbol. To learn more, see Creating Charts.
  3. Add the necessary signals to the chart. To learn more, see Using Studies.
  4. Set signal and strategy properties. To learn more, see Signal Settings and Strategy Properties.
  5. Open the Strategy Properties window.

    To open the Strategy Properties window:
    1. Open the Format Objects window.

      To open the Format Objects window, right-click on an empty area of the chart and then click Format Signals.

      The Format Objects window can also be opened by one of the following methods:
        - Select Format in the main menu and click Signal.
        - Double-click any one of the signal's labels on the chart.
        - Position the mouse pointer over any one of the signal's labels on the chart; once the Pointer Pointer.png changes into a Hand Hand.png, right-click the label and then click Format Signals.

    2. Select the Signals tab.
    3. Click Properties to open the Strategy Properties window.

  6. Select the Auto Trading tab.
  7. Select the Require order confirmation check box to have the opportunity to confirm or reject each order before it is sent to the execution gateway.
  8. Select Replace to Market Partially Filled Orders check box to automatically convert the remaining portion of a partially filled limit order into a market order. For example, there is a sell limit order above the market price for 10 contracts. The trading price touches the sell limit price, but pulls back. Six of the contracts are filled and the remaining four contracts are unfilled. MultiCharts will convert the sell limit order for the remaining contracts to a sell market order at the close of the bar. (e.g., If the chart is plotting 5 minute bars, then the remaining portion of the limit order will be converted to a market order at the close of the 5 minute bar.)

    Note: As long as there is a partially filled order, MultiCharts will always convert the order as described in this step regardless of any settings that are in Unfilled Strategy Order Replacement. If the order was not partially filled and Unfilled Strategy Order Replacement was turned on, then MultiCharts will convert the order according to the settings in Unfilled Strategy Order Replacement.

  9. Select the Show order execution status check box to have a status message displayed every time an order is sent, canceled, filled, or rejected, or any other informational message is received from the gateway application.
  10. Select the Audio Alert check box and choose a sound file to activate an audio alert every time a notification window appears.
    Selecting an Alert Sound File:
    1. Enter the path and name of the wave (.wav) sound file to be used into the File text box, or click the ... ellipse.gif button on the right side of the text box for Open dialog box, navigate to and select a sound file, and click the Open button.
    2. Click the Test button to test the alert.
    3. Select Play Once or Repeat for the alerts to be played once or repeatedly, respectively.
  11. In the Mode Selection section, there are two options: synchronous and asynchronous mode.
    1. Select Entries/Exits are based on the execution confirmation by the broker (Sync) option for synchronous auto trading mode (SA).
    2. 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.

    Unfilled Strategy Order Replacement
    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.
      Note: The waiting period for converting unfilled limit or stop orders to market orders must be less than the duration of a single bar.

      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.


    Assign the Initial Market Position at the Broker Settings
    To learn more, see Synchronization of Market Position in Auto Trading Mode.
    • Select Flat to set the initial position to 0.
    • Select From Chart to set the initial position to the position that's on the chart.
    • Select From Broker to set the initial position the same as actual position at the broker.
    • Select Always show dialogue window to display a dialog box to input the initial position and average entry price. This dialog box will appear when auto trading is turned on in the chart (see last step).
    • Select Show dialogue window only if market position on chart is different from broker to display a dialog box to input the initial position only when there is a difference between chart position and broker position.
  12. Choose the broker/gateway from the list box in the 'Broker Plug-ins' section.
  13. Click Settings.
  14. Input the settings for the appropriate broker/gateway.

Turning on Auto Trading in MultiCharts

  1. Turning on auto trading on the chart
    • SA Mode
      1. Select the Auto Trading Status Switch and select Automate Order Execution.
      2. Make sure that the proper Broker Plug-in is selected. You can click on the name to access it's properties. If the wrong Broker Plug-in is selected, then please click No, and select the correct one in Auto Trading settings.
      3. Read the disclaimer and click Yes.
      4. The button will turn green which means auto trading is on.
    • AA Mode
      1. Select the Auto Trading Status Switch and select Automate Order Execution.
      2. Make sure that the proper Broker Plug-in is selected. You can click on the name to access it's properties. If the wrong Broker Plug-in is selected, then please click No, and select the correct one in Auto Trading settings.
      3. Read the disclaimer and click Yes.
      4. If Show the Assign the Initial Market Position at the Broker dialogue was selected earlier, then a dialog box will appear.
        Enter the initial market position and average entry price. Then select Yes.
      5. The button will turn green which means auto trading is on.
  2. Turning on auto trading from main menu
    • SA Mode
      1. Select Format from the main menu.
      2. Select Automate Order Execution.
      3. Click on the switch and select Automate Order Execution.
      4. Make sure that the proper Broker Plug-in is selected. You can click on the name to access it's properties. If the wrong Broker Plug-in is selected, then please click No, and select the correct one in Auto Trading settings.
      5. Read the disclaimer and click Yes.
      6. The button will turn green which means auto trading is on.
    • AA Mode
      1. Select Format from the main menu.
      2. Select Automate Order Execution.
      3. Click on the switch and select Automate Order Execution.
      4. Make sure that the proper Broker Plug-in is selected. You can click on the name to access it's properties. If the wrong Broker Plug-in is selected, then please click No, and select the correct one in Auto Trading settings.
      5. Read the disclaimer and click Yes.
      6. If Show the Assign the Initial Market Position at the Broker dialog was selected earlier, then the dialog box will appear. Input the initial market position and average entry price. Then select Yes.
      7. The button will turn green which means auto trading is on.


Turning off Auto Trading in MultiCharts

  1. Turning off auto trading from the chart
      1. Select the Auto Trading Status Switch and deselect Automate Order Execution.
      2. If there are orders pending, a dialog box will appear to ask if pending orders should be cancelled. Select Cancel Orders or Do Not Cancel Orders to proceed.
      3. If there are open positions, a dialog box will appear to ask if open positions should be closed. Select Close Positions or Do Not Close Positions to proceed.
      4. The Auto Trading Status Switch will turn gray which means auto trading is turned off.
  2. Turning off auto trading from the main menu
      1. Select Format and deselect Automate Order Execution.
      2. If there are orders pending, a dialog box will appear to ask if pending orders should be cancelled. Select Cancel Orders or Do Not Cancel Orders to proceed.
      3. If there are open positions, a dialog box will appear to ask if open positions should be closed. Select Close Positions or Do Not Close Positions to proceed.
      4. The Auto Trading Status Switch will turn gray which means auto trading is turned off.

Enabling and Disabling Auto Trading on Multiple Charts

Since MultiCharts 14 it is possible to enable automated trading on all charts from all of the currently open MultiCharts desktops.
To turn on auto trading on several charts:

  1. Select Format from the main menu.
  2. Click Enable Automated Order Execution for Multiple Charts.

Or

  1. From the Main toolbar select the Enable Automated Order Execution for Multiple Charts option.

In the opened up window put the checkmark next to the strategies/workspaces/desktops that you would like to enable. The window displays the essential information about the signals applied to each chart, the selected mode of trading (SA or AA), the selected broker plugin and the Assign the Initial Position option.

To turn off auto trading on several charts:

  1. Select Format from the main menu.
  2. Click Disable Automated Order Execution for Multiple Charts.

Or

  1. From the Main toolbar select the Disable Automated Order Execution for Multiple Charts option.

Managing Active Orders and Open Positions

If you do not want to see the pending orders dialog box when disabling auto trading select File in the main menu, click Preferences, select the Trading tab and check the Do not show cancel active orders confirmation dialog when disabling auto trading check box.

There are two options available:

  • Cancel active orders sent by the strategy;
  • Do not cancel active orders sent by the strategy.

If you do not want to see the open position dialog box when disabling auto trading select File in the main menu, click Preferences, select the Trading tab and check the Do not show close open position confirmation dialog when disabling auto trading check box.

There are two options available:

  • Close the open position opened by the strategy;
  • Do not close the open position opened by the strategy.
Note: If the workspace (or MultiCharts) was closed while auto trading mode was enabled on one or several charts, a dialogue asking you if you want to enable auto trading on these charts on restart. Click Yes to enable auto trading or No to open charts with auto trading disabled.