Using DTC Server for Data and Trading in Another Sierra Chart Instance

Using DTC Server for Data and Trading in Another Sierra Chart Instance

The DTC Protocol Server in Sierra Chart can be used by another instance of Sierra Chart either on the same computer or across a network. The DTC Protocol Server allows the sharing of the market data and trading functionality of the server instance of Sierra Chart to other instances of Sierra Chart. These other instances are referred to as the client instances. This DTC Server supports both market data and trading.

The instructions on this page are for sharing the market data and trading functionality from one instance of Sierra Chart with another instance. If you want to use multiple copies of Sierra Chart with different Data and Trading services, then refer to the Using Multiple Data and Trading services page instead of the instructions on this page below.

  1. Make sure you are running a current version of Sierra Chart. Update Sierra Chart by selecting Help >> Download Current Version.
  2. Using the DTC Protocol server to share market data and to trade in other instances of Sierra Chart whether on the same computer or different computers, completely replaces the method of sharing chart and market data documented on the Multiple Services page. However, the instructions on that page to install another copy of Sierra Chart on your computer system is still applicable to the method described here.
  3. An easy way to start another instance of Sierra Chart on the same computer which will connect to the DTC Server for market data and trading, is to select File >> New Instance in an existing running instance of Sierra Chart. In this particular case skip all the way to step number 20 below.

    File >> New Instance may not be functional on some versions of Sierra Chart provided with broker provided accounts.

    This step only applies when using another instance of Sierra Chart on the same computer. Otherwise, skip to step 4 below. If you are using Sierra Chart on a different virtual machine on the same computer, then also go to step 4 below and do not use the File >> New Instance command.

    To automatically start new instances of Sierra Chart on startup of the main instance, the instance numbers can be specified as a comma separated list in Global Settings >> General Settings >> Instances to Run on Startup. For example, you can enter a 2 in that edit box to automatically start a second instance. Or enter 2, 3 to start a second and third instance automatically.

    When using File >> New Instance, a new instance is automatically updated to the same version as the main instance of Sierra Chart.

    Each instance of Sierra Chart maintains its own copy of global settings, Chartbooks and chart data files. The first time a new instance is created, it receives a copy of the global settings and Chartbooks from the main instance.
  4. If you are not using the File >> New Instance command as described in the previous step, then install another copy of Sierra Chart on your computer system or a different system where you will using Sierra Chart as the client. Refer to the instructions in the Step-By-Step Instructions to Install Multiple Copies of Sierra Chart section.
  5. In the instance of Sierra Chart which will be used as the server, select Global Settings >> Data/Trade Service Settings.
  6. Press the SC Server Settings button.
  7. Enable the DTC Protocol Server >> Enable DTC Protocol Server option.
  8. In the Listening Port box, specify the port number for the server to listen on or keep the default. This cannot be 0.
  9. Set the Historical Data Port or keep the default. This cannot be 0 unless you do not want to use the historical data server.
  10. Unless you require the Auto Send Security Definition for New Symbols option, make sure this option is disabled. In standard cases this should be disabled. Otherwise, the Sierra Chart client instance connecting to the DTC Server, will request real-time data and download historical data for all symbols being tracked in the Server instance.
  11. Enable the Allow Trading option if you want to perform trading in other instances of Sierra Chart.
  12. Press OK to save the settings and close the SC Server Settings window.
  13. In the instance of Sierra Chart which will be used as the client, this can be on the same or different computers, select Global Settings >> Data/Trade Service Settings.
  14. Set the Service to DTC Service (sub instance).
  15. Set the Server Address to the IP Address of the computer running the instance of Sierra Chart where the DTC Server is enabled on.

    In the case of when connecting to the DTC server from another copy of Sierra Chart on the same computer, use this IP address: 127.0.0.1.

    In the case of when connecting to the DTC server on another computer on your Local Area Network, use the the Local Area Network IP address of the computer where the DTC Server is running.

    In the case of when connecting to the DTC server across the Internet, the IP address needs to be the public IP address for the computer running the DTC server. An easy way to find this is to run an Internet search for "what is my IP address" from the computer running the DTC server.
  16. Set the Server Port to the Port used by the DTC Server you set up above. This is going to be what is set in Global Settings >> Data/Trade Service Settings >> SC Server Settings >> DTC Protocol Server >> Listening Port in the instance of Sierra Chart using the DTC server. Refer to the image below.
  17. Set Use Sierra Chart Instance Username and Password to Yes/True when connecting to other instances of Sierra Chart on other computers that are logged in with your own Sierra Chart Username (Account Name) and Password. Otherwise, set the Username and Password to match the Username (Account Name) and Password that were used to log into the instance of Sierra Chart which is being connected to.
  18. It is recommended to set Use TLS (Transport Layer Security) Yes/True when connecting across the Internet to another copy of Sierra Chart and you will be using that connection for trading. This enables encryption. However, for the connection to succeed, Global Settings >> Data/Trade Service Settings >> SC Server Settings >> DTC Protocol Server >> Require TLS must be enabled in the instance of Sierra Chart using the DTC Server.
  19. Press OK.
  20. To open a chart which will be fed by the DTC Server from the main instance of Sierra Chart, select File >> Find Symbol in the new instance of Sierra Chart.
  21. The Find Symbol list will initially be empty because the Symbol Settings have to be requested. Wait a moment for them to be received and then the list will fill in. If this does not occur within about 5 to 20 seconds, then follow the procedure to perform a Full Reset of the Symbol Settings to get them. It is necessary to have the proper Symbol Settings in an instance of Sierra Chart which is connected to the DTC Server of another instance.

Historical Data and Missing Historical Data

All historical Intraday and Daily data for a Symbol in an instance of Sierra Chart connected to the DTC Server instance, is downloaded from the existing Intraday or Daily chart data file in the DTC Server instance if the file exists.

If the file exists, but it is not up to date with the current data, then the current data will be downloaded into the file first before the data is served to client instances of Sierra Chart.

If a chart data file does not exist in the DTC Server instance, then the data will be first automatically downloaded for that Symbol and chart data type from the connected Data or Trading service the DTC Server instance is set to use. When this historical data download is done, then the data is served to client instances of Sierra Chart.

If there is any missing or incorrect Historical Daily or Intraday chart data in the client instance of Sierra Chart which is connected to the DTC Server, then go to the DTC Server instance (the main instance of where you selected File >> New Instance) and open the same type of chart (Historical or Intraday) for the same Symbol and correct any missing or incorrect data issues there first.

Refer to the following sections to solve any missing or incorrect data issues.

Simulated Trading in a Sub Instance

Simulated trading can be performed two different ways in a sub instance of Sierra Chart.

First Method

Use Trade Simulation Mode by enabling Trade >> Trade Simulation Mode On. In this case, all of the trading activity is contained within the sub instance where the trading is performed.

Second Method

  1. Set the main instance of Sierra Chart that the sub instance is connected to, to use Trade Simulation Mode.
  2. In the sub instance, disable Trade >> Trade Simulation Mode On.
  3. From the Chart or Trade DOM you will be trading from in the sub instance, select one of the Simulation (Sim#) accounts. Refer to Selecting Trade Account.
  4. All trading from the sub instance will then be simulated and be processed in the main instance. Logging of the simulated trading will be in both instances.

Using the Correct Trade Account

When trading in a sub instance of Sierra Chart and Trade >> Trade Simulation Mode On is disabled, it is necessary to use the Trade Account in the sub instance which corresponds to the Trade >> Trade Simulation Mode On setting in the main instance of Sierra Chart.

When Trade >> Trade Simulation Mode On is enabled in the main instance, then you can only use simulated trading accounts in the sub instance (Example: Sim1). Refer to Selecting Trade Account.

When Trade >> Trade Simulation Mode On is disabled in the main instance, then you can only use non-simulated trading accounts in the sub instance. Refer to Selecting Trade Account.

If the incorrect Trade Account is being used in the sub instance, you will see a message like this in Trade >> Trade Service Log in the sub instance after submitting an order:

Rithmic Trading order update (Order reject). Info: Simulated Trade Account (Sim1) cannot be used when Trade Simulation Mode is disabled. Internal Order ID: #. Service Order ID: (none). Symbol: (symbol)

Resolving DTC Protocol Server Port Number Conflicts

Normally only one instance of Sierra Chart that you are running on the same computer should be set to be a DTC Server and have the DTC Protocol Server enabled.

If other instances of Sierra Chart which are running your computer system at the same time also have the DTC Server enabled, you need to make sure there are not port number conflicts. In other words, they need to be using different port numbers.

Client instances of Sierra Chart which connect to a DTC Server instance of Sierra Chart must have the Global Settings >> Data/Trade Service Settings >> SC Server Settings >> Enable DTC Protocol Server option disabled to avoid port number conflicts.

Below is an example of what you will see in the Message Log indicating a port number conflict.

DTC Protocol Server failed to start listening on port 11099.

Listening socket (1740), port 0 | Failed to bind socket to 0.0.0.0:11099. Windows error code 10048: Only one usage of each socket address (protocol/network address/port) is normally permitted.

Listening socket (1740), port 0 | Closed.

Follow through the below steps to resolve port number conflicts.

  1. Go to the main instance of Sierra Chart and select Global Settings >> Data/Trade Service Settings >> SC Server Settings.
  2. Make sure the Enable DTC Protocol Server option is enabled and make a note of the Listening Port and Historical Data Port numbers.
  3. Press OK.
  4. Press OK.
  5. Go to the next instance of Sierra Chart on your system and select Global Settings >> Data/Trade Service Settings >> SC Server Settings.
  6. Either uncheck the Enable DTC Protocol Server option or set the Listening Port and Historical Data Port numbers to different port numbers than what are currently used in the main instance of Sierra Chart. You can use any port numbers. They should be in the range of 10000 through 60000.
  7. In the case of an instance of Sierra Chart started with File >> New Instance and where the Global Settings >> Data/Trade Service Settings >> Service in that instance is set to DTC - Sub Instance, then you must uncheck the Enable DTC Protocol Server option.
  8. Press OK.
  9. Press OK.
  10. Repeat steps 5 through 9 for other instances of Sierra Chart on your system.

Deleting Sub Instances

When a sub instance is started, the Sierra Chart program and configuration files, are copied to a subfolder within the main Sierra Chart installation folder (C:\SierraChart by default). The name of the folder is SierraChartInstance_# where # is the instance number. The instance numbers start at 2 and go up depending upon how many sub instances were simultaneously running.

Any of the files in the SierraChartInstance_# folders can be deleted. The files must only be deleted when the sub instance is not currently running. For example you can delete the Sierra3.cfg file, to cause the main configuration file from the main instance of Sierra Chart to be used next time the sub instance is started through File >> New Instance.

Any of the Study Collection files in the Data subfolder of the sub instance folder can also be deleted if you want to update those to the current Study Collections used in the main instance.

If you do not want to use the sub instance any longer or just want to delete all of the files for whatever reason, the entire SierraChartInstance_# folder can be deleted through your operating system file manager.

Source of Data for Sub Instances

The source of both continuously updating real-time and historical data in a sub instance of Sierra Chart opened with File >> New Instance or another instance of Sierra Chart connected to the DTC Server in a main instance, will always be the main instance of Sierra Chart.

In the sub instance, you will never see the [M] designation after a symbol . This is normal.


*Last modified Sunday, 17th December, 2017.