Strategy Field

Use signal time in force for entries

If you check the Use signal time in force for entries checkbox, then the timeInForce parameter in your webhook will be used if it exists. If the parameter does not exist in your webhook, then the Entry time in force configured in the strategy settings will be used. If the timeInForce parameter is not supported by your broker, then it will fallback to the configured time in force in the strategy settings. The allowed values are:

  • day - The order is valid for the trading day and will be canceled if not executed by the end of the trading day.
  • gtc - The order is good until canceled and will remain active until it is executed or canceled.
  • opg - The order is valid for the opening of the market and will be canceled if not executed at the market open.
  • cls - The order is valid for the closing of the market and will be canceled if not executed at the market close.
  • ioc - The order is immediate or canceled, meaning it must be executed immediately or canceled.
  • fok - The order is fill or kill, meaning it must be executed immediately in its entirety or canceled.

Here is an example of a limit order with a time in force of gtc and extendedHours set to true:

{
    "ticker": "AAPL",
    "action": "buy",
    "orderType": "limit",
    "limitPrice": 150,
    "timeInForce": "gtc",
    "extendedHours": true
}

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