Auto-Flatten in NinjaTrader: A Complete Setup Guide
Auto-flatten is the most important safety feature most prop traders never set up properly. The idea is simple: when a defined risk condition fires — usually a buffer on daily loss or trailing drawdown — all open positions close and all working orders cancel automatically. Done well, it's the layer that catches you when manual discipline fails. Done poorly, it fires at the wrong moment and creates a worse problem than it prevented.
This guide walks through what auto-flatten actually does, where native NinjaTrader 8 falls short, how to set it up in Drawdown Guardian, and the gotchas that ruin first-time implementations.
- Auto-flatten is a safety net, not a guarantee — it can slip in fast markets, reject due to broker issues, or misfire on a misconfigured trigger.
- Always test in Sim before enabling live. Force the trigger condition manually and confirm the behavior.
- The buffer trigger ("flatten at 80% of daily loss limit") matters more than the trigger itself — set it where you have time to flatten before the firm-side rule fires.
- Combine with Daily Closeout — time-based auto-flatten — for end-of-day discipline that doesn't depend on you remembering to walk away.
What auto-flatten actually does
When the trigger condition fires, auto-flatten executes three steps in sequence: cancel all working orders on the account, submit market exits for any open positions, and disable further trading until the next session boundary or manual reset.
What it does not do: prevent the trade that triggered the condition (that already happened), guarantee a fill at any particular price (market exits during fast moves can slip several points), or override broker-side risk rules (if the firm has already breached you server-side, auto-flatten can't undo it).
Native NinjaTrader vs add-on auto-flatten
NinjaTrader 8 has limited native auto-flatten. The Account Performance window can be configured to alert on P&L thresholds, but executing the flatten requires manual intervention or a third-party add-on. Some brokers have server-side auto-liquidation, but those fire at the firm's hard rule, not at a buffer you control.
Native NT8 / broker-side
- Fires at the firm's hard rule limit, not a configurable buffer
- Server-side execution, very reliable when it fires
- By the time it fires, you've already breached
- No on-chart visibility into how close you are
Add-on auto-flatten (e.g. Drawdown Guardian)
- Fires at a configurable buffer inside the firm's rule
- Local execution — depends on NinjaTrader running and connected
- Gives you room to flatten before the firm-side check
- On-chart visibility plus visual + audible alerts before the trigger
Local buffer-based auto-flatten + server-side firm rules is the layered approach. The local trigger fires first to keep you well inside the firm's line. The server-side rule is the backstop if the local trigger fails (NinjaTrader crashed, connection dropped, etc.).
Setting up auto-flatten in Drawdown Guardian
Drawdown Guardian's Auto Flatten is opt-in — off by default. Enabling it is straightforward, but the key decision is the trigger condition and buffer percentage.
- Load Drawdown Guardian on the chart for the account you want to monitor.
- Select your firm preset (Apex, Topstep, Tradeify, or Manual) and confirm the rule values match your account.
- Set the safety buffer to 70–80% of the published daily loss limit. Most blow-ups happen between 80% and 100% of the limit — you want the trigger inside that range.
- Enable Auto Flatten in the indicator settings.
- Test in Sim first: force the buffer condition by taking simulated losses until you cross it. Confirm Auto Flatten fires and the account flattens.
- Only after a clean Sim test, enable it on a live account.
Trigger types — buffer, hard limit, time-based
Drawdown Guardian supports several Auto Flatten trigger conditions. You can run multiple simultaneously:
- Daily loss buffer — fires when intraday loss reaches X% of the published daily loss limit. Most useful for live trading.
- Trailing drawdown buffer — fires when the account approaches the trailing drawdown threshold. Critical for evaluations.
- Hard limit safety net — fires at the firm's published rule itself, as a backstop in case the buffer trigger fails.
- Daily Closeout — time-based; fires at a configurable Eastern Time regardless of P&L.
Daily Closeout — the time-based flatten you should also use
Daily Closeout is a separate trigger from buffer-based Auto Flatten, and most traders should run both. Set it to 16:59 ET (one minute before the cash close) and the account flattens regardless of P&L. End-of-day discipline without depending on your willpower at 16:55 to walk away from a position.
Why this matters: many of the worst trades come in the final 30 minutes of the session. Either trying to make back losses, or holding a winner too long because "the close is coming." Daily Closeout removes the decision.
Gotchas — when auto-flatten doesn't work
- NinjaTrader crashed or disconnected. Auto-flatten depends on the platform running. If NT8 closed unexpectedly, the trigger can't fire. Mitigation: keep working orders broker-side (Bracket Boss does this by default) so your stops still protect you.
- Fast-market slippage. Auto-flatten submits a market exit. In a fast move, that exit can fill several points away from where the trigger fired. Mitigation: set the buffer further inside the firm's rule (70% instead of 90%) so slippage doesn't push you over.
- Broker rejection. Some brokers reject exits during certain conditions (e.g. trading halts). Mitigation: confirm your broker handles flatten requests during all the conditions you trade.
- Trigger misconfigured. If you set a buffer at 100% of the limit, the trigger fires exactly at the breach point and offers no protection. Always set inside the rule, not at it.
- Multiple instances. Don't run Drawdown Guardian on multiple charts with conflicting Auto Flatten settings on the same account. One instance per account is the supported configuration.
If you find yourself relying on Auto Flatten to save you from your own decisions repeatedly, the problem isn't the configuration — it's the trading. Auto Flatten is for the day something genuinely unexpected happens, not for the trade you knew was wrong before you took it.
The Auto-Flatten safety checklist
- Buffer set inside the firm's published rule (70–80%, not 95%).
- Tested in Sim by forcing the trigger condition and observing actual flatten behavior.
- Combined with broker-side working orders so stops survive a platform crash.
- Daily Closeout enabled at end-of-session ET time.
- Only one Auto Flatten instance per account.
- Reviewed quarterly when prop firm rules change.
Frequently asked
Should I enable auto-flatten from day one?+
Not on a live account. Test in Sim first — force the trigger condition manually and confirm the behavior matches your expectations. Once you've confirmed it works the way you think it does, enable it on live. Many traders skip the Sim test and discover surprises during a real session, which defeats the point.
What happens if my internet drops when auto-flatten should fire?+
The trigger can't fire if the platform isn't connected. That's why broker-side working orders matter — your stops still protect you at the broker level even if NinjaTrader is offline. Auto-flatten is one layer of a defense-in-depth setup, not the only layer.
Can I override auto-flatten if I'm in a position I want to keep?+
Drawdown Guardian's Auto Flatten can be disabled from the settings before the trigger fires. Once it fires, it executes — by design. If you want to disable it for a particular trade, do so before you cross the buffer, not while the alert is going off.
Does auto-flatten work for trailing drawdown or only daily loss?+
Both. Drawdown Guardian supports a buffer trigger on daily loss limit, trailing drawdown, or both simultaneously. For evaluations, the trailing drawdown trigger is usually the more important one.
What about news trading — should I disable auto-flatten?+
Depends on your firm and your strategy. Some firms prohibit news trading entirely. Of those that allow it, fast-market slippage can push your trigger to fire at a worse price than you'd manually exit. Either disable auto-flatten before known news events, or set the buffer wider to give yourself room. Don't run news trades with a tight auto-flatten buffer.