Skip to content

Strategy risk limit#

About#

You can configure trading to be stopped once total drawdown generated during specific period is exceeded. Can be specified either for balance or equity drawdown

Fields#

Name Type Required Description
type string Yes restriction type. One of day, date, week, week-to-date, month, month-to-date, quarter, quarter-to-date, year, year-to-date or lifetime
applyTo string Yes account metric to apply limit to. One of balance-difference, balance-minus-equity, equity-difference
maxAbsoluteRisk number max drawdown allowed, measured in account currency
maxRelativeRisk number max drawdown allowed, expressed as a fraction of 1
closePositions boolean Yes whether to force close positions when the risk is reached. If value is false then only the new trades will be halted, but existing ones will not be close
startTime string(datetime) time to start risk tracking from (in ISO format). All previous trades will be ignored. You can use this value to reset the filter after stopout event

applyTo semantics#

  • balance-difference assumes that the application will calculate drawdown as a balance which was observed in the beginning of risk management period minus current balance. Risk management period starts according to UTC time
  • balance-minus-equity assumes that the application will calculate drawdown as a balance which was observed in the beginning of the risk management period minus current equity. Risk management period starts according to UTC time
  • equity-difference assumes that the application will calculate drawdown via risk management api (as a balance which was observed in the beginning of the risk management period minus current equity). Risk management period starts according to broker time

Example#

{
  "type": "day",
  "applyTo": "balance-difference",
  "maxAbsoluteRisk": 0.05,
  "maxRelativeRisk": 0.01,
  "closePositions": true,
  "startTime": "2020-08-24T00:00:00.000Z"
}

Usages#