+1 888 340 6572

Getting Started with AutoTrading: Difference between revisions

From MultiCharts
 
(83 intermediate revisions by 11 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
# 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.  
# Create a chart for the necessary symbol.  To learn more, see [[Creating Charts]].
# 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 clientsA demo account supports only some of the symbols, has limited historical data, and provides delayed quotes. The user name is '''<i>edemo'''</i> and the password is '''<i>demouser'''</i>.<div>
# Add the necessary signals to the chart.  To learn more, see [[Using Studies]].
# In Trader Workstation, click the '''Configure''' icon on the toolbar, or click '''Configure''' in the main menu.  
# Set signal and strategy properties.  To learn more, see [[Signal Settings]] and [[Strategy Properties]].
# Click '''API''' and then select the '''Enable ActiveX and Socket Clients''' check box.
# Open the '''Strategy Properties''' window:
## Open the '''Format Objects''' window.<br><span>{{FormatObjectIS}}</span>
## Select the '''Signals''' tab.
## Click '''Properties''' to open the '''Strategy Properties''' window.<br><br>
# Select the '''Auto Trading''' tab.
# 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.
# 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:
## 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.
## Select '''Play Once''' or '''Repeat''' for the alerts to be played once or repeatedly, respectively.
# In the '''Price Orders Emulation''' section you can switch between native and emulated Stop, Limit and Stop-Limit orders. This feature requires real-time data subscription on your broker account.
#* '''Native orders''' are server-side orders. As soon as an order is sent to the broker, it is managed by the broker.
#* '''Emulated orders''' are managed in MultiCharts, and when the price conditions are met, MultiCharts sends a market or a limit order to the broker.  
# In the '''Mode Selection''' section, there are two options: [[Understanding Automated Trade Execution|synchronous and asynchronous modes]].
## In '''synchronous''' mode '''[SA]''', open market position and active orders on the chart are the same as at broker. All orders generated by historical calculation during Backtesting are wiped out from the chart when auto execution is turned on. Executed order is displayed only if it has been executed at broker and the final status of the order has been received by MultiCharts. To use synchronous mode for auto trading select '''Entries/Exits are based on the execution confirmation by the broker (Sync)'''.
## In ''' asynchronous ''' mode ''' [AA] ''' the strategy on the chart starts auto trading based on the historically calculated orders and open position, displaying all orders generated by the script on chart even if an order was not executed at broker. In AA, strategy on chart acts separately from broker.<br>To use asynchronous mode for auto trading select '''Entries/Exits are independent of the execution status at the broker (Async)'''.
#: To learn more, see [[Auto_Trading#Mode Selection|Mode Selection in Auto Trading Mode]].
# In the '''Assign Initial Market Position to Strategy''' section choose the initial position of the strategy.
## 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 each time auto trading is enabled on the chart (see [[Getting Started with AutoTrading#Enabling and Disabling Auto Trading on Multipl Charts|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.
#: If AA is selected, the '''Show dialogue window only if market position on chart is different from broker''' option is replaced with '''Show dialogue window only if market position on chart is not flat'''. 
#: To learn more, see [[Auto_Trading#Assign the Initial Market Position at the Broker Settings|Synchronization of Market Position in Auto Trading Mode]].
# Choose the broker/gateway from the list box in the ''''''[[Auto Trading#Select Broker Plug-in|Select Broker Plug-in]]'''''' section.  
# Click '''Settings'''.
# Input the settings for the appropriate broker/gateway.
::More info about configuring each particular broker plug-in can be found on the corresponding page:
::<categorytree mode=pages  showcount="on" depth=2>Broker Plug-ins</categorytree>


<br>
== Turning on Auto Trading in MultiCharts ==
*Turning on auto trading on the chart
# Select the [[Auto_Trading#Distinguished Features of Auto Trading|Auto Trading Status Switch]] and select '''Automate Order Execution'''.
# Make sure that the proper Broker Plug-in is selected.  You can click on the name to access its properties. If the wrong Broker Plug-in is selected, then please click '''No''', and select the correct one in Auto Trading settings.
# Read the disclaimer and click '''Yes'''.
# 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 the main menu
# Select '''Format''' from the main menu.
# Select '''Automate Order Execution'''.
# Make sure that the proper Broker Plug-in is selected.  You can click on the name to access its properties. If the wrong Broker Plug-in is selected, then please click '''No''', and select the correct one in Auto Trading settings.
# 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.


=== Setting Up Patsystems ===
== Turning off Auto Trading in MultiCharts ==
 
*Turning off auto trading from the chart
Please refer to Patsystems' documentation.
# Select the [[Auto_Trading#Distinguished Features of Auto Trading|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 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.
*Turning off auto trading from the main menu
# 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 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.


== Enabling and Disabling Auto Trading on Multiple Charts ==
It is possible to enable automated trading on all charts from all of the currently open MultiCharts desktops. This feature is a part of [[Advanced Strategy Pack]].<br><br>
To enable 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'''.
<br>
<br>
=== Setting Up Rithmic 01 ===
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>


Please refer to Rithmic's documentation.
To disable 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.


<br>
== Managing Active Orders and Open Positions ==
=== Setting Up Rithmic Test ===


Please refer to Rithmic's documentation.
To enable or disable the pending orders dialog box when turning off auto trading, select '''File''' in the main menu, click '''Preferences''' and select the '''Trading''' tab. In the section '''Managing active orders when autotrading is turned off''', choose the necessary option:


*Cancel active orders sent by the strategy;
*Do not cancel active orders sent by the strategy;
*Require manual confirmation
<br>
<br>
=== Setting Up Trading Technologies ===
To enable or disable the open position dialog box when turning off auto trading, select '''File''' in the main menu, click '''Preferences''' and select the '''Trading''' tab. In the section '''Managing open position when autotrading is turned off''', choose the necessary option:


Please refer to Trading Technologies' documentation.
*Close the open position opened by the strategy;
*Do not close the open position opened by the strategy;
*Require manual confirmation


<br>
<div class="note"> If the workspace (or MultiCharts window) was closed while auto trading mode was enabled on one or several charts, on restart you will see a dialogue asking if you want to enable auto trading on these charts. Click '''Yes''' to enable auto trading or '''No''' to open charts with auto trading disabled.</div>
=== Setting Up Zen-Fire ===
 
Please refer to Zen-Fire's documentation.
 
<br>
== Setting Up Auto Trading in MultiCharts ==


[[Category:AutoTrading]]
[[Category:AutoTrading]]

Latest revision as of 16:00, 7 June 2024

Setting Up Auto Trading in MultiCharts

  1. Create a chart for the necessary symbol. To learn more, see Creating Charts.
  2. Add the necessary signals to the chart. To learn more, see Using Studies.
  3. Set signal and strategy properties. To learn more, see Signal Settings and Strategy Properties.
  4. 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 changes into a Hand , right-click the label and then click Format Signals.
    2. Select the Signals tab.
    3. Click Properties to open the Strategy Properties window.

  5. Select the Auto Trading tab.
  6. 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.
  7. 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.
  8. In the Price Orders Emulation section you can switch between native and emulated Stop, Limit and Stop-Limit orders. This feature requires real-time data subscription on your broker account.
    • Native orders are server-side orders. As soon as an order is sent to the broker, it is managed by the broker.
    • Emulated orders are managed in MultiCharts, and when the price conditions are met, MultiCharts sends a market or a limit order to the broker.
  9. In the Mode Selection section, there are two options: synchronous and asynchronous modes.
    1. In synchronous mode [SA], open market position and active orders on the chart are the same as at broker. All orders generated by historical calculation during Backtesting are wiped out from the chart when auto execution is turned on. Executed order is displayed only if it has been executed at broker and the final status of the order has been received by MultiCharts. To use synchronous mode for auto trading select Entries/Exits are based on the execution confirmation by the broker (Sync).
    2. In asynchronous mode [AA] the strategy on the chart starts auto trading based on the historically calculated orders and open position, displaying all orders generated by the script on chart even if an order was not executed at broker. In AA, strategy on chart acts separately from broker.
      To use asynchronous mode for auto trading select Entries/Exits are independent of the execution status at the broker (Async).
    To learn more, see Mode Selection in Auto Trading Mode.
  10. In the Assign Initial Market Position to Strategy section choose the initial position of the strategy.
    1. Select Flat to set the initial position to 0.
    2. Select From Chart to set the initial position to the position that's on the chart.
    3. Select From Broker to set the initial position the same as actual position at the broker.
    4. Select Always show dialogue window to display a dialog box to input the initial position and average entry price. This dialog box will appear each time auto trading is enabled on the chart (see last step).
    5. 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.
    If AA is selected, the Show dialogue window only if market position on chart is different from broker option is replaced with Show dialogue window only if market position on chart is not flat.
    To learn more, see Synchronization of Market Position in Auto Trading Mode.
  11. Choose the broker/gateway from the list box in the 'Select Broker Plug-in' section.
  12. Click Settings.
  13. Input the settings for the appropriate broker/gateway.
More info about configuring each particular broker plug-in can be found on the corresponding page:

Turning on Auto Trading in MultiCharts

  • Turning on auto trading on the chart
  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 its 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.
  • Turning on auto trading from the main menu
  1. Select Format from the main menu.
  2. Select Automate Order Execution.
  3. Make sure that the proper Broker Plug-in is selected. You can click on the name to access its properties. If the wrong Broker Plug-in is selected, then please click No, and select the correct one in Auto Trading settings.
  4. Read the disclaimer and click Yes.
  5. 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.
  6. The button will turn green which means auto trading is on.

Turning off Auto Trading in MultiCharts

  • 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.
  • 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

It is possible to enable automated trading on all charts from all of the currently open MultiCharts desktops. This feature is a part of Advanced Strategy Pack.

To enable 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 disable 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

To enable or disable the pending orders dialog box when turning off auto trading, select File in the main menu, click Preferences and select the Trading tab. In the section Managing active orders when autotrading is turned off, choose the necessary option:

  • Cancel active orders sent by the strategy;
  • Do not cancel active orders sent by the strategy;
  • Require manual confirmation


To enable or disable the open position dialog box when turning off auto trading, select File in the main menu, click Preferences and select the Trading tab. In the section Managing open position when autotrading is turned off, choose the necessary option:

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