Strategy Field

Exit order type

You can customize the order type that will be sent to your broker for exits by selecting a value from the Exit order type dropdown. By default, limit orders are sent unless you select a different value or send a custom orderType from your webhook.

Alternatively, you can control the order type from your webhook by sending a custom orderType in your JSON. The value in the JSON will override the value selected in the strategy settings. If the webhook contains an order type that your broker does not support, then it will fallback to the configured order type in the strategy settings. The allowed values are:

  • market - fills at the current market price
  • limit - fills at the specified price or better
  • stop - converts to a market order when the stop price is reached
  • stop_limit - converts to a limit order when the stop price is reached
  • trailing_stop - converts to a market order when the price moves against you by a specified amount

Market

A market order is an order to buy or sell a security immediately at the best available current price.

{
    "ticker": "AAPL",
    "action": "buy",
    "orderType": "market"
}

Limit

A limit order is an order to buy or sell a security at a specific price or better.

{
    "ticker": "AAPL",
    "action": "buy",
    "orderType": "limit",
    "limitPrice": 100
}

Stop

A stop order is an order to buy or sell a security when its price touches the stop price. It is converted to a market order when the stop price is reached.

{
    "ticker": "AAPL",
    "action": "buy",
    "orderType": "stop",
    "stopPrice": 100
}

Stop Limit

A stop limit order is an order to buy or sell a security when its price reaches a certain point, known as the stop price, and then converts into a limit order.

{
    "ticker": "AAPL",
    "action": "buy",
    "orderType": "stop_limit",
    "stopPrice": 100,
    "limitPrice": 99
}

Trailing Stop Dollar Amount

A trailing stop order is a stop order that can be set at a defined percentage or dollar amount away from a security's current market price. The trailing stop price is adjusted as the price moves in your favor.

{
    "ticker": "AAPL",
    "action": "buy",
    "orderType": "trailing_stop",
    "trailAmount": 1
}

Trailing Stop Percentage

A trailing stop order is a stop order that can be set at a defined percentage or dollar amount away from a security's current market price. The trailing stop price is adjusted as the price moves in your favor.

{
    "ticker": "AAPL",
    "action": "buy",
    "orderType": "trailing_stop",
    "trailPercent": 1
}

Ready to automate your trading? Sign up for free today.