You can customize the order type that will be sent to your broker for entries by selecting a value from the Entry 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 pricelimit
- fills at the specified price or betterstop
- converts to a market order when the stop price is reachedstop_limit
- converts to a limit order when the stop price is reachedtrailing_stop
- converts to a market order when the price moves against you by a specified amountA market order is an order to buy or sell a security immediately at the best available current price.
{
"ticker": "AAPL",
"action": "buy",
"orderType": "market"
}
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
}
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
}
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
}
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
}
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
}