> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://partner.ninjatrader.com/eval/overview/prop-firm-management/risk-management/post-trade-risk/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://partner.ninjatrader.com/_mcp/server. # Post-Trade Risk > Configure risk thresholds that trigger automatic liquidation and account lockouts Post-trade risk is evaluated after positions are open. When an account breaches a threshold (like a daily loss limit or trailing max drawdown), the system automatically liquidates positions and can lock the account. ## Configuring Post-Trade Risk Settings You can configure post-trade risk in two ways: 1. At account creation, by providing a `postTradeRisk` object on the account object. 2. At any time after creation, by calling [`updateUserAutoLiq`](/eval/api/rest-api-endpoints/risks/update-user-auto-liq). Both methods let you configure the following settings: > **Note** > > All these fields are optional. Omitting a field will simply ignore calculations for that liquidation type. For example, an account without a `dailyLossAutoLiq` has no daily loss limit applied. | Field | Description | | :----------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **marginPercentageAlert** | Margin percentage that triggers an alert to the permitted user. | | **dailyLossPercentageAlert** | Daily loss percentage (of the day's starting balance) that triggers an alert to the permitted user. | | **dailyLossAlert** | Dollar-value daily loss that triggers an alert to the permitted user. | | **marginPercentageLiqOnly** | Margin percentage that triggers `Liquidate Only` mode. The account can close positions but can't open new ones. | | **dailyLossPercentageLiqOnly** | Daily loss percentage (of the day's starting balance) that triggers `Liquidate Only` mode. | | **dailyLossLiqOnly** | Dollar-value daily loss that triggers `Liquidate Only` mode. | | **marginPercentageAutoLiq** | Margin percentage that triggers automatic liquidation. | | **dailyLossPercentageAutoLiq** | Daily loss percentage (of the day's starting balance) that triggers automatic liquidation. Unlocks at the next market open. | | **dailyLossAutoLiq** | Dollar-value daily loss that triggers automatic liquidation. Unlocks at the next market open. | | **weeklyLossAutoLiq** | Dollar-value weekly loss that triggers automatic liquidation. Unlocks at market open on Sunday. | | **flattenTimestamp** | Flattens and cancels all open positions at this date-time. This is a one-time event, not a recurring schedule. Once flattened, nothing prevents the user from re-opening positions. | | **trailingMaxDrawdown** | Maximum loss the account can sustain before automatic liquidation. The threshold trails upward as the account profits. | | **trailingMaxDrawdownLimit** | Equity level at which trailing stops. For example, if set to \$50,100 on a \$50,000 account, the trailing drawdown level won't increase beyond \$50,100. | | **trailingMaxDrawdownMode** | Which trailing max drawdown mode to use. See [Drawdown Modes](/eval/overview/prop-firm-management/risk-management/drawdown-modes) for more information. | | **dailyProfitAutoLiq** | Dollar-value daily profit that triggers automatic liquidation. Unlocks at the next market open. | | **weeklyProfitAutoLiq** | Dollar-value weekly profit that triggers automatic liquidation. Unlocks at the next Sunday open (5 PM CT). | | **doNotUnlock** | When `true`, the account stays locked after a daily loss limit breach instead of auto-unlocking at the next market open. You must manually unlock the account by calling [`setAdminAutoLiqAction`](/eval/api/rest-api-endpoints/risks/set-admin-auto-liq-action) with `adminAction` set to `Normal`. Only affects daily loss limit breaches; standard trailing max drawdown violations lock the account permanently regardless. In a bounced-market scenario where volatility pushes the balance back above the drawdown threshold, `doNotUnlock` keeps the account locked and prevents auto-unlock. There is no bulk endpoint to unlock accounts locked with `doNotUnlock` set to `true`, so accounts must be unlocked one at a time. If you're managing the `doNotUnlock` workflow, plan for a backend process that resets accounts individually before each session. | ## Checking Liquidation Status To check where an account currently stands, call [`accountRiskStatus/list`](/eval/api/rest-api-endpoints/risks/account-risk-status-list). It returns the following information for each account you can access: its current status (`adminAction`), the reason code for that status (`adminActionReasonCode`), the start and stop timestamps of the most recent auto-liquidation period (`autoLiqStarted` and `autoLiqStopped`), and how many times the account has been auto-liquidated (`autoLiqCounter`). > Configure risk thresholds that trigger automatic liquidation and account lockouts