Getting Started with AutoTrading

From MultiCharts
Revision as of 13:04, 13 September 2022 by Vlada Krutogolovaya (talk | contribs) (→‎Managing Active Orders and Open Positions)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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: Since Multicharts 11 Beta 1 this option has been replaced with the "Partially Filled Orders Replacement" controls.

  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.

    Note: Since Multicharts 9.0 this option has been disabled.

  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. In synchronous mode [SA] one can see the same open market position and active orders on the chart 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 generated by the script orders 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.
  12. In the Assign Initial Market Position to Strategy section choose the initial position.
    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 when auto trading is turned on in 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.
  13. Choose the broker/gateway from the list box in the 'Select Broker Plug-in' section.
  14. Click Settings.
  15. 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 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. 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 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.
  2. Turning on auto trading from main menu
    • SA Mode
      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. 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. 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

  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 want 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

If you want 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
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.