Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom Stop and Target Orders
#1
Custom Stop and Target Orders
As of version 3.3.0, we have added the ability to have APM manage custom Stop and Target orders. These are different from regular signals since APM will manage two orders at once for a given position alongside any regular orders.

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

Order Types
To distinguish between the custom stop/target orders and regular STP/TGT orders, we use the names Exit Stop (E_STP) and Exit Target (E_TGT). These names (somewhat) intuitively imply that these stop and target prices will be used for exiting positions, essentially functioning as highly customizable bracket orders. It's important to note that E_STP and E_TGT orders are handled by the same system that is described in the Position Management system described in the Strategies documentation. The major difference is that you as a user can specify the STP and TGT prices instead of letting APM choose.

Signals Formats
There are two ways to specify to use custom stop/target orders: directly in signals for regular orders OR as separate signals.

Regular Signals
  • When you want to open (or modify) a position with an order, you can specify a E_STP or E_TGT price in the signal.
    For example, all of the following are valid signals

    BTO SPY 500 SHARES MKT E_STP 200
    LONG SPY 500 SHARES LOC 300 E_TGT 600
    LONG SPY 500 SHARES LMT 300 E_STP 200 E_TGT 600

  • Once one of the above signals open a position, then E_STP and E_TGT prices will be used to create orders.
  • Note that the signal must be valid in order for the E_STP or E_TGT price to be processed

E_STP and E_TGT Signals
  • When we only want to update the E_STP and E_TGT price, we can use custom signals in the following format:
    [OrderType] [Ticker] [Price]

    For example,
    E_TGT SPY 600
    E_STP SPY 400

  • Note that these signals can only be processed if a position or order already exists for the ticker.

Cancelling Custom Stop/Target Orders
You can cancel a custom Stop and Target order by using a -1 in the price spot of an E_STP or E_TGT signal. For example,
E_TGT SPY -1
E_STP SPY -1
Note that you cannot set the E_STP/E_TGT price to -1 in a regular signal to cancel stop/target orders.

GeneralĀ  Notes
  • Note that the prices specified in the most recent regular signal for E_STP and E_TGT will be used. This means that if you specify a signal without an E_STP (or E_TGT) price, the existing E_STP (or TGT) price will be removed.
  • You can cancel these E_STP and E_TGT orders. If regular STP and TGT orders are enabled, then those will be placed once you cancel the E_STP or E_TGT order.
  • If you close a position, all E_STP and E_TGT orders are cancelled. Furthermore, if you cancel the order associated with an E_STP (or E_TGT) order (and there is no position), then the E_STP (or E_TGT) order will be cancelled
  • Conditional Orders (RSN,REL,RES, etc.) don't place E_STP or E_TGT immediately. The E_STP and E_TGT orders are only registered after the conditional order triggers. This also means that using a different E_STP or E_TGT value than the current one for something like a ReEnter Long (REL) signal will not affect your current E_STP or E_TGT price, until that REL signal is converted to a regular order later.

CSV Signal File Format
Please see the File Formats documentation for details.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)