_old: How to connect TradeStation Platform (update 14)

Important changes in TradeStation 9.5 (Update 14)

The latest version of TradeStation stopped sending "Sell Short" and "Buy to Cover" e-mails. It sends just "Sell" and "Buy" e-mails now.

This is a big problem for Collective2. To be able to interpret "Buy" and "Sell" signals correctly, Collective2 needs to know the TradeStation account state (i.e. a position is FLAT, LONG or SHORT). If the position is FLAT, the "Sell" signal now means "Sell Short" in TradeStation Update 14. If the position is "LONG", the "Sell" signal now means "Sell to Close". It is understandable, but...

The problem is that the TradeStation account state is not 100% reliable information on the Collective2 side. If some software or internet transmission or human error occurs, we can miss an opening signal Sell (which means "Sell Short" if the position is FLAT). If we miss it, the next "Buy" e-mail, which should be interpreted as "Buy to Cover", will be interpreted as "Buy to Open" on the Collective2 side, because the position is FLAT in the Collective2 strategy model.

TradeStation knows and uses its account state and it still uses info like "Sell Short" and "Buy to Cover" internally.

See this picture:

However, it sends following "Sell" and "Buy" e-mails for signals shown in the above picture:

TradeStation - Strategy Active Order for EURUSD
   Order: Sell 100,000 EURUSD @ Market
   Account: SIM
   Occurred: 06/28/16 09:51:02
   Signal: Custom_SE
   Interval: 1 min.
   Workspace: C:\Program Files (x86)\TradeStation 9.5\MyWork\bs_test_01a

TradeStation - Strategy Filled Order for EURUSD
   Order: Sell 100,000 EURUSD @ Market
   Account: SIM
   Occurred: 06/28/16 09:51:04
   Signal: Custom_SE
   Interval: 1 min.
   Workspace: C:\Program Files (x86)\TradeStation 9.5\MyWork\bs_test_01a

TradeStation - Strategy Active Order for EURUSD
   Order: Buy 100,000 EURUSD @ Market
   Account: SIM
   Occurred: 06/28/16 09:48:02
   Signal: Custom_Cover
   Interval: 1 min.
   Workspace: C:\Program Files (x86)\TradeStation 9.5\MyWork\bs_test_01a

TradeStation - Strategy Filled Order for EURUSD
   Order: Buy 100,000 EURUSD @ Market
   Account: SIM
   Occurred: 06/28/16 09:48:02
   Signal: Custom_Cover
   Interval: 1 min.
   Workspace: C:\Program Files (x86)\TradeStation 9.5\MyWork\bs_test_01a


What could happen if you use the new Update 14:

  • Say the Collective2 strategy is FLAT.
  • For some reasons, we do not receive a "Sell" e-mail - which should mean "Sell Short" now.
  • Then, we receive a "Buy" e-mail from you - which means "Buy to Cover" on your side.
  • But Collective2 will go LONG, because the strategy model is FLAT.

Until now, when we receive a "Buy to Cover" signal while your Collective2 strategy was FLAT, we know something is wrong. We could wait if your "Sell to Short" signal arrives within a few seconds (which means signals were swapped because of some network transmission delays). If "Sell to Short" arrives, we would swap the two signals in the correct order. If not, we would send an alert message to the user.

But we are lost receiving just a "Buy" signal now.

Solution

You do not need to do anything if you are trading just in the LONG direction. But we badly need the trade direction information for the SHORT direction. Please add that information to the "Signal" field in the TradeStation e-mails.

What to do

Modify your EasyLanguage strategy code and add correct information about the trade direction.

EasyLanguage example:

inputs: SECondition( C < O ) ;
  
  if SECondition then
      Sell Short ( "Short" ) next bar at market ;
  
  if not SECondition then
      Buy Cover ( "Cover" ) next bar at market ;


Trade directions words and shortcuts

Sell Short

Short
  SE

Buy To Cover

Cover
  SX

Buy to Open

Buy
  LE

Sell to Close

 Sell
  LX

You can use also EXIT or CLOSE words in the "Sell" and "Buy" signals. Such signals will be recognized as "Sell to Close" and "Buy to Close".

You can use also ENTRY, ENTER or OPEN words in the "Sell" and "Buy" signals. Such signals will be recognized as "Sell to Open" and "Buy to Open".

IMPORTANT: If there are two or more words in your text, then the first is valid.

For example, the text: "A BUY signal for my previous SELL – CLOSE SHORT position " means "Buy". Examples Following texts will be recognized as "Sell Short":

 Short
    SHORT
    Sell to Open
    Sell to Entry
    Sell to Enter
    This is my Short signal
    Entering Short
    Closing Signal Short
    SE
    This is my SE signal
    SE to entry
    Custom-SE
    SE-Custom

Following texts will NOT be recognized as "Sell Short":

MyShort
    ShortStock
    OpenShort
    SellShortOpen
    ShortSignal
    SESignal
    CustomSE
    ShortEnter

Following texts will be recognized as "Buy to Cover":

Buy to Cover
    Buy to Close
    Buy to Exit
    Cover
    COVER
    Cover Signal
    This is my Cover signal
    Cover a position
    SX
    Custom SX
    Custom-SX
    Custom_SX
    This is my SX signal

Note: Full descriptive texts "Buy to Cover", "Buy to Close" and "Buy to Exit" are exceptions from the rule "If there are two or more words in your text, then the first is valid". Following texts will NOT be recognized as "Buy to Cover":

 MyCover
    CoverMyPosition
    CustomSX
    ShortExit

Following texts will be recognized as "Buy to Open":

Buy
    BUY
    BUY TO OPEN
    Buy to Enter
    Buy to Entry
    Buy Signal
    This is my Buy signal
    Buy to enter position
    LE
    Custom LE
    Custom-LE
    Custom_LE
    This is my LE signal

Following texts will NOT be recognized as "Buy to Open":

MyBuy
    BuyStock
    BuyToOpen
    SignalBuy
    BuyForProfit
    LESignal
    CustomLE

Following texts will be recognized as "Sell to Close":

Sell
    SELL
    Sell to Close
    Sell to Exit
    This is my Sell signal
    ClosingSignal_Sell
    Closing Signal Sell
    Sell - Closing Signal
    LX
    This is my LX signal
    ClosingSignal_LX
    Closing Signal LX
    Custom-LX
    LX Custom

Following texts will NOT be recognized as "Sell to Close":

MySell
    SellExit
    SellStock
    SellToClose
    SignalSell
    SellForProfit
    LXSignal
    CustomLX

Please check your current strategies code and make sure your signal names are in accordance with this Collective2 TradeStation Interface update.

Have more questions?