Order Behavior

This page documents the buy and sell behavior when TradersPost receives strategy signals. TradersPost has the ability take either the long or short side of a strategy. The ability to take both sides is a new feature that is currently under development and is only available for paper trading currently. If you are interested in learning more about the both sides functionality, please email [email protected].

Buy TSLA

{
    "ticker": "TSLA",
    "action": "buy"
}
  • If there are open orders for TSLA, they will be canceled.
  • If a short position is open for TSLA, then the open position will be exited with a Buy To Cover order and TradersPost will wait for the exit order to fill.
  • If no long position is open for TSLA, then a Buy order will be sent.
  • If there is no exit order, no entry order and no orders to cancel then the signal will be rejected.

Sell TSLA

{
    "ticker": "TSLA",
    "action": "sell"
}
  • If there are open orders for TSLA, they will be canceled.
  • If a long position is open for TSLA, then the open position will be exited with a Sell order and TradersPost will wait for the exit order to fill.
  • If no short position is open for TSLA, then a Sell Short order will be sent.
  • If there is no exit order, no entry order and no orders to cancel then the signal will be rejected.

Price

If you send a value in the price field then a limit order will be sent unless configured to be a market order in the strategy subscription configuration.

{
    "ticker": "TSLA",
    "action": "buy",
    "price": 600.00
}

If you omit the price field in the JSON, then the resulting order will be a market order.

Quantity

Sending a quantity with your signal will work for both entries and exits. The quantity will only be used if you check the Use signal quantity checkbox in your strategy subscription.

Entries

For entries, if you send a signal quantity and enable using signal quantity strategy subscription, then the quantity from the signal will be used for your entry order.

{
    "ticker": "TSLA",
    "action": "buy",
    "price": 600.00,
    "quantity": 5
}

If you omit the quantity field in the JSON, then the quantity will be dynamically calculated based on your strategy subscription configuration or if a quantity cannot be calculated, it will be defaulted to 1.

Exits

Sending a quantity with your signal for exits looks the same. If you send a quantity that is less than the total quantity of your open position, then a partial exit order will be submitted. If you send a quantity that is greater than or equal to the total quantity available, or you omit the quantity, then the full position will be exited.

{
    "ticker": "TSLA",
    "action": "sell",
    "price": 700.00,
    "quantity": 5
}

Add to Position

You can add to existing open positions by enabling the "Allow add to position" checkbox in your strategy subscription. Normally, if you for example have an existing open long position and you send another buy signal, the trade would be rejected. However, if you enable "Allow add to position", then the signal won't be rejected and an order will be created to add to your existing long position.

Both Sides

The ability to take both the long and short side of a strategy in one strategy subscription is only available in paper accounts at the moment. We hope to be able to make both sides available for live accounts sometime in Q3 or Q4 of 2021.

When you receive a buy signal and you are trading both sides of a strategy, the following will happen:

  • If there are open orders for TSLA, they will be canceled.
  • If a short position is open for TSLA, then the open position will be exited with a Buy To Cover order and TradersPost will wait for the exit order to fill.
  • If no long position is open for TSLA, then a Buy order will be sent.
  • If there is no exit order, no entry order and no orders to cancel then the signal will be rejected.

When trading both sides of a strategy, TradersPost requires that the exit be a market order. We will wait for 1 minute for the market exit order to fill before submitting the entry order. If the exit order takes longer than 1 minute to fill, the trade will be failed and you will be notified via email and you will need to take manual action.

Workarounds

You can work around this limitation in live accounts by having 2 broker accounts, one for the long side and one for the short side. Setup 2 strategy subscriptions in TradersPost for each broker account. In one strategy subscription choose short and in the other choose long.