SignalCopier Chart Script

SignalCopier Chart Script

"SignalCopier" is a signal script included with StrategyXtender that follows market position changes generated by your own trading strategies. Its purpose is to connect your chart strategies to the StrategyXtender Windows Service, and enables you to publish trades in real time from your strategies to Collective2 or other services without any custom programming.

SignalCopier (_tsSignalCopier in MultiCharts and TradeStation) is attached to a chart like any other signal or strategy script. Setup parameters allow you to specify the symbol and quantity to be traded when entry and exit signals are detected from other signals attached to the same chart. All required communication with StrategyXtender and the connected trade publisher is performed in real time automatically on behalf of your other signal strategies.

_tsSignalCopier and support functions are installed as an archive file that must be imported and compiled before it can be used. The file containing _tsSignalCopier is installed in the default installation directory for your trading platform. Note that the file name shown will change depending on the software version:

  • MultiCharts64 (import and compile using PLEditor, "Read Only" import option)
    • 64 bit: c:\program files\TS Support\Multicharts64\StrategyXtender_API_V1.7.0S_MC64.sef
  • TradeStation 9.5 (import and compile using TradeStation Development Environment Editor)
    • c:\program files (x86)\TradeStation 9.5\Program\TRADERSCIENCE_STRATEGYXTENDER_API_V1.6.1X_PROTECTED.ELD

Once the archive has been successfully imported and compiled, add the signal named "_ts_tsSignalCopier" to a chart and update the settings to specify the target service and trading system, trade symbol, symbol type, and quantity. Here are some examples of how to set the _tsSignalCopier "ServiceId":

  SignalCopier ServiceId  
Collective2 "Collective2:12345678"  
Tradency "Tradency:12345"  
United Signals "UnitedSignals:mylogin"  
ZuluTrade "ZuluTrade:mylogin"  



When enabled, _tsSignalCopier will then connect to the StrategyXtender Windows service and establish a login session to the selected service, such as Collective2. When market position changes are detected resulting from your own signals attached to the same chart, _tsSignalCopier will create the necessary orders to open and close both long and short positions. _tsSignalCopier will regularly check the account position status and ensure that your strategy position and service account remain in sync.

_tsSignalCopier will respond to position changes normally on the next tick following the position change. Please note that this may result in some slippage between fill prices between your own strategy and C2.

Important: You can trade multiple strategies to a single account with your selected service, such as Collective2 or United Signals, but you must ensure that each strategy uses a unique trading symbol.

Shoud there be any interruptions in network availability, _tsSignalCopier will attempt to recover and resume normal operation automatically as required.


 

_tsSignalCopier Settings

Example Collective2 Settings in Signal Copier

 

Example United Signals Settings for Signal Copier

You must contact United Signals for your API Key.

 

Example ZuluTrade Settings for Signal Copier


 

ServiceID: This sets the target service and system or account for the target trade publisher or broker.

  • Collective2: "Collective2:nnnnnnnn", where n is your C2 SystemID
  • ZuluTrade: "ZuluTrade:myusername", where myusername is the ZuluTrade account username
  • Tradency: "Tradency:nnnnnn", where n is your Tradency system id
  • United Signals: "UnitedSignals:myusername" where myusername is your United Signals account login name

Note: quotation marks as shown are required!

Required Settings

ServiceEnable: true (enables service connection to StrategyXtender)

TradeSymbol: Symbol to be traded (must be in the format used by the target service)

Symbol Type: instrument or security type (choose "forex","future","stock", or "option")

GoLong: true - enable new long positions

GoShort: true - enable new short positions

OrderQty: Set the number of contracts, mini-lots, shares, or options to be traded when a new position is opened. (Default: 0, determined by strategy position)

QtyFactor: When OrderQty is set to 0, the order quantity is calculated by mulitplying the strategy quantity by this factor. For "forex", use .0001 to change the strategy quantity to mini-lots.

WaitUntilFlat:
true: don't close an existing position at the remote service if the strategy is flat
false: immediately synchronize the remote service position to match the strategy (warning: this may result in an position being closed!)

RecentBars: (default 3) _tsSignalCopier considers any signal generated by your strategy that is younger than the number of bars specfied here will be considered as an active signal to be sent to the remote service. This prevents stale signals that are active in your strategy when first starting _tsSignalCopier.

Optional Settings

ProfitTicks: If you wish to attach a profit target order, specify the number of ticks (pips) to be added to the entry price for Long positions, (subtracted for Short positions).

StopLossTicks:
If you wish to attach a fixed stop loss order, specify the number of ticks (pips) to be subtracted from the entry price for Long positions (added for Short positions)

MinOrderMoveTicks: Price must change by at least this many ticks before moving an existing stop loss or profit target order

MinBuyPower: Minimum buying power required to open a new position (Collective2 only)

Comments:   Additional notes to be included with signals for this strategy. (Collective2 only)

TimeInForce: Specifies the valid duration for new orders:
"GTC": Good Till Cancel (order remains active until filled, cancelled by user, or expired by broker)
"DAY": order valid until end of current session (default)

StrategyID: (default: 0) for order tracking by stragegy  (future version)

 

 

 

Read 2680 times