Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Conditional Signals (REL/RES/RSN/OTS/OTL)
#1
Conditional Orders
These orders allow users to automatically place orders that will enter and exit positions given certain conditions.

Before reading ahead, make sure you have read the Stock Signals tutorial.

On-Trigger Signals
Allows you to preemptively place an order to modify a position once it opens. These are useful for when you want to place two orders in the market, but you only want the second order to be placed after the first is executed. You can also use them to automatically place orders to close positions.

On-Trigger Long (OTL)
  • Signal to go long a specified amount as soon as a position opens
  • If there is currently a position, this signal will be ignored
  • Requires a signal ID to be processed
  • An existing OTL order can be cancelled by sending an OTL order with quantity 0 (MUST specify 0 SHARES; something like OTL SPY ID 200 won't cancel the order)
On-Trigger Short (OTS)
  • Signal to go short a specified amount as soon as a position opens
  • If there is currently a position, this signal will be ignored
  • Requires a signal ID to be processed
  • An existing OTS order can be cancelled by sending an OTS order with quantity 0 (MUST specify 0 SHARES; something like OTL SPY ID 200 won't cancel the order)
The following will double our position if the initial BTO order is executed. Note that the OTL order is placed FIRST in case the BTO order executes immediately.
OTL AAPL 200 %POSITION LMT 90  ID 200
BTO AAPL 10 SHARES LMT 100

ReSet to Neutral (RSN)
  • Signal to close a position as soon it opens
  • If there is currently a position, this signal will become a CLOSE order immediately
  • Requires a signal ID to be processed
  • An existing RSN order can be cancelled by sending a RSN order with quantity 0 (MUST specify 0 SHARES; something like RSN SPY ID 200 won't cancel the order)
The following will place a CLOSE AAPL MOC DAY order if the initial AAPL position opens
BTO AAPL LMT 100
RSN AAPL MOC DAY ID 200


ReEnter Signals
Allows you to preemptively place an order to re-enter the market once the original position in a stock is closed. This may be useful if you want to maintain a long-term position in a stock, but you think it will go down. Hence, you can put a CLOSE LMT order to close the position and a REL LMT order to re-enter the position at lower price.

ReEnter Long (REL)
  • Signal to re-enter a long position as soon as it is closed
  • If the current position is not long, this signal will be ignored
  • Requires a signal ID to be processed
  • An existing REL order can be cancelled by sending a REL order with quantity 0 (MUST specify 0 SHARES; something like REL SPY ID 200 won't cancel the order)
ReEnter Short (RES)
  • Signal to re-enter a short position as soon as it is closed
  • If the current position is not short, this signal will be ignored
  • Requires a signal ID to be processed
  • An existing RES order can be cancelled by sending a RES order with quantity 0 (MUST specify 0 SHARES; something like RES SPY ID 200 won't cancel the order)
Suppose we are currently long AAPL. Then placing the order
REL AAPL LMT 100 ID 201
will place an order BTO AAPL LMT 100 when our position in AAPL is closed.
Note that a closing order(CLOSE/STC/BTC) should be placed AFTER the REL order to ensure that the REL order is not ignored if the closing order is executed immediately.

Conditional Order Expiration Time
Since it may be desirable to have REL/RES/RSN/OTL/OTS orders automatically cancelled after sometime, we have added a Conditional Orders section that allows you to do this in the Strategy Settings.

Note that when you specify a Time In Force (TIF) in a Conditional Signal, that TIF is for the order that will be placed, not the Conditional Signal itself. That means if you place
REL AAPL LMT 100 DAY ID 201
then IF this limit order is placed, its TIF will be DAY. The Conditional Signal itself is not cancelled unless you specify a cancellation time in your strategy settings.

The expiration time format is simply hh:mm:ss zzz where zzz is the timezone, e.g. 15:30:00 EST

Notes
  • The signals you place with RSN/REL/RES/OTL/OTS actions work exactly the same as regular signals. That means that all parameters (like price, order type, TIF) will be stored and passed onto the signal that may eventually be placed as an order.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)