Tradovate Flatten All Not Working in NinjaTrader
You slam Flatten in NinjaTrader and nothing happens, but Tradovate still shows the position open. Here's why the button goes dead and how to resync it fast.
You're in a trade, price is moving against you, and you slam the Flatten button in NinjaTrader to bail out, and nothing happens. The position just sits there. You can see it's still open on the Tradovate web platform, but NinjaTrader acts like there's nothing to close. It's one of the more stomach-dropping moments in futures trading, and the cause is almost always the same: NinjaTrader and Tradovate have fallen out of sync. NinjaTrader flattens by firing a market order to offset the position it thinks you hold. If its record is stale, the contract is live at Tradovate but never got reported into NinjaTrader, the button has nothing to act on. The fix is to disconnect and reconnect your Tradovate connection so NinjaTrader re-pulls the real account state, then flatten again. And if money is on the line right now, close the position straight from the Tradovate web platform first, because that's the actual broker record.
Quick Fix: Resync, Then Flatten
- If a position is exposed right now, flatten in Tradovate first. Open the Tradovate web platform, find the position, and close it there. Tradovate is the broker of record, that click always works even when NinjaTrader is confused.
- Reconnect the broker connection. In the NinjaTrader Control Center, open the Connections menu, disconnect from your Tradovate connection, wait a few seconds, then reconnect. This pulls the latest account state back into NinjaTrader.
- Confirm the position reappears. Check the Positions tab after reconnecting. Once NinjaTrader shows the live contract, the Flatten button has something real to act on.
- Flatten again. With the position visible and the connection healthy, press Flatten and the offsetting market order goes through.
- Check you're in the right window. Close Position only touches the instrument and account tied to the window you press it in, make sure it's pointed at the account that actually holds the position.
What the Flatten Button Actually Does
To understand why it fails, you have to know what “flatten” means under the hood. When you hit Flatten in NinjaTrader, it doesn't wave a magic wand over your broker account. It runs a two-step routine: first it cancels any working orders on that position, waits for the broker to confirm those cancellations, and then it sends a market order in the opposite direction to bring your net position to zero.
The key word there is opposite direction to what NinjaTrader believes you hold. The whole operation is built on NinjaTrader's internal record of your account position. If that record says you're flat, zero contracts, there's nothing to offset, so pressing Flatten produces exactly nothing. No order, no error, no movement. The button isn't broken. It's doing precisely what it was told: close a position it doesn't think exists.
There's also a distinction worth pinning down, because it trips people up. Close Position acts only on the single instrument and account tied to the window you clicked it in. Flatten Everything is the bigger hammer, it closes all open positions and cancels all working orders across every connected account and instrument in the NinjaTrader Desktop app. If you're jabbing Close Position in a chart or DOM that's pointed at a different account, it'll look dead even though it's working correctly on the wrong target.
The Real Culprit: Your Position Is Out of Sync
NinjaTrader keeps its own picture of your account and updates it from the broker's live feed. Tradovate holds the truth, the actual contracts sitting in your account, and NinjaTrader mirrors that over the connection. When the mirror gets out of date, you get the classic split: a position open in Tradovate that NinjaTrader simply doesn't see.
How does the record go stale? A few common ways:
- The connection dropped and came back. If a fill landed during the gap, or the feed hiccupped while a contract was live, NinjaTrader can miss the update and never register the position.
- The order was placed somewhere else. An entry sent from the Tradovate web app, the mobile app, or another tool won't necessarily flow into NinjaTrader's position record if the sync isn't clean.
- A communication break swallowed the close request. Sometimes the position is in NinjaTrader, but when you press Flatten the request never reaches Tradovate. The link is degraded enough that the order dies on the way out.
In all of these, the answer is the same: NinjaTrader needs to re-read your account from Tradovate. It can't offset a position it hasn't been told about, and it can't route an order down a broken pipe.

Step-by-Step: Fix the Stuck Flatten
Step 1: Protect the Position First
Before you troubleshoot anything, deal with your risk. If you've got a live contract exposed to the market, don't sit there fighting a frozen button, open the Tradovate web platform in a browser, go to the Positions module, and flatten the position there. Tradovate is the broker; that close request originates at the source and doesn't depend on NinjaTrader's health. Get flat, breathe, then fix the tooling.
Step 2: Disconnect the Tradovate Connection
In the NinjaTrader Control Center, open the Connections menu. You'll see your configured Tradovate connection (it may be named after your prop firm). Select it to disconnect. The little status light for that connection drops from green, telling you NinjaTrader has released the link to Tradovate.

Step 3: Reconnect and Let It Resync
Give it a few seconds, then open the Connections menu again and pick the same connection to reconnect. When the status light goes green again, NinjaTrader re-pulls the current account values from Tradovate, balances, working orders, and crucially your open positions. This single move clears the majority of stuck-flatten cases, because it repopulates the exact record the Flatten button relies on.
Step 4: Confirm the Position, Then Flatten
Check the Positions tab. The contract that was invisible a moment ago should now be listed with the right quantity and side. Now the Flatten button has a real position to work with, press it, and the offsetting market order goes out. If you already closed the trade in Tradovate during Step 1, you'll instead see NinjaTrader catch up and show you flat.

If Reconnecting Doesn't Fix It
A reconnect solves most of these, but not every one. Work through the rest in order:
You Got a Timeout Message
If pressing Close Position throws something like “Close operation failed. Operation timed out. Manually close your position,” that's a specific signal. NinjaTrader waits roughly five seconds for the broker to confirm the order cancellations; if that confirmation never lands, it gives up and tells you to close by hand. That timeout points squarely at a connection loss between your computer and the broker's servers, your ISP, the broker side, or the network in between. Close the position manually in Tradovate, then sort out the connection before you trade again.
Check You're Acting in the Right Window
Run through the obvious one: is the window you're clicking in actually pointed at the account with the position? Close Position is window-scoped. A DOM, chart, or order ticket set to a different account will report success on nothing while your real position sits untouched elsewhere. Match the account selector to the position before you decide the button is broken.
Restart NinjaTrader
If disconnect/reconnect didn't clear the mismatch, close NinjaTrader completely and relaunch it. A full restart rebuilds the connection and the position cache from scratch, which shakes loose sync problems a simple reconnect can't. Confirm your positions match Tradovate the moment it reconnects.
Contact Your Broker or Prop Firm to Flatten Server-Side
If a position is genuinely stuck, you can't close it in NinjaTrader or the Tradovate web platform, that's beyond a client-side sync issue and you need help at the source. Contact Tradovate support or your prop firm and ask them to flatten the account from their side. Have your account details ready and describe exactly what you're seeing. This is the last resort, but during a real outage it's the safest way to get flat.
Symptom-to-Fix Cheat Sheet
| What you see | Likely cause | Fix |
|---|---|---|
| Flatten does nothing; Tradovate shows the position open | NinjaTrader's position record is stale, it thinks you're flat | Disconnect and reconnect the Tradovate connection to resync, then flatten |
| Close Position “succeeds” but position stays open | Window is pointed at the wrong account/instrument | Point the window at the account holding the position, then retry |
| “Operation timed out. Manually close your position” | No broker confirmation within ~5 seconds, connection loss | Close in Tradovate web, fix your connection, then reconnect NinjaTrader |
| Position visible in NinjaTrader but Flatten still fails | Close request isn't reaching Tradovate over a degraded link | Reconnect or fully restart NinjaTrader; flatten in Tradovate meanwhile |
| Can't close anywhere, in either platform | Broker-side outage or a truly frozen order | Contact Tradovate/your prop firm to flatten the account server-side |
Keep It From Happening Again
A flatten button you can't trust in a fast market is a real hazard, so it's worth building a few habits that keep the sync solid:
- Trade on a stable connection. Most sync breaks trace back to a flaky link. A wired connection beats Wi-Fi, and a trading VPS beats a home network that shares bandwidth with everything else in the house.
- Turn on auto-reconnect. NinjaTrader can re-establish a dropped connection on its own. With it enabled, a brief network blip is more likely to heal before it leaves your positions stranded.
- Keep the Tradovate web platform open as a backup. One browser tab logged into Tradovate is a free emergency kill switch. If NinjaTrader ever freezes on you, you flatten there in two clicks.
- Don't run two order sources against one account. Firing entries from NinjaTrader and another tool into the same account is a reliable way to desync the position record. Pick one primary router per account.
- Test your recovery before you need it. Deliberately disconnect and reconnect on a demo or simulated account and watch how fast the positions repopulate. Knowing the routine cold means you won't fumble it mid-trade.
Route Your Trades Through a Managed Bridge
A lot of these sync headaches come from wiring a desktop platform straight into a broker and then babysitting the connection yourself. If your goal is to automate entries and exits from TradingView, you can skip the fragile middle layer entirely. PickMyTrade sits between TradingView and Tradovate and manages one clean connection to the broker for you:
- A single managed connection to Tradovate, so you're not juggling a desktop platform's sync state against the account.
- Alerts routed straight to the broker, your entry, stop, and exit logic fire from TradingView to Tradovate without a third app holding a stale position record.
- Built-in exit handling so closing logic runs through the same reliable pipe your entries do.
- No connection plumbing to babysit, the platform handles the connect and reconnect cycle you'd otherwise be watching in the Control Center.
Stop Wrangling Broker Connections
PickMyTrade manages a single clean connection to Tradovate so a stale position record never leaves you fighting a frozen Flatten button.
Start Your Free 5-Day TrialFrequently Asked Questions
Almost always because NinjaTrader and Tradovate are out of sync. NinjaTrader flattens by sending a market order to offset the position it currently believes you hold. If the position is live at Tradovate but hasn't been reported into NinjaTrader, the button has nothing to act on and does nothing. A communication break where the close request never reaches the broker produces the same dead button. Disconnecting and reconnecting the broker connection re-pulls the true account state and the flatten works.
In the NinjaTrader Control Center, open the Connections menu, disconnect from your Tradovate connection, wait a few seconds, then reconnect. That forces the latest account values to be pulled from Tradovate, so the real open position reappears in NinjaTrader and the Flatten button can act on it. If the position is exposed to the market right now, flatten it straight from the Tradovate web platform first, since that is the actual broker record.
Close Position acts only on the single instrument and account tied to the window you press it in. Flatten Everything closes all open positions and cancels all working orders across every connected account and instrument in the NinjaTrader Desktop app. If you press Close Position in a window that isn't pointed at the account holding your position, nothing happens, which is easy to mistake for a broken button.
NinjaTrader keeps its own record of your account position and updates it from the broker feed. A dropped or stalled connection, a fill that arrived while NinjaTrader was reconnecting, or an order placed outside NinjaTrader can leave its record blank while Tradovate still holds a live contract. Tradovate is the source of truth. Reconnect the broker connection so NinjaTrader repopulates from the account, and the position shows up again.
When you press Close Position, NinjaTrader waits about five seconds for the broker to confirm the order cancellations before it sends the offsetting market order. If no confirmation arrives in that window it reports that the operation timed out and tells you to close manually. That points at a connection loss between your machine and the broker's servers. Check your internet, reconnect, and if a position is still open, flatten it from the Tradovate web platform.
No. Reconnecting doesn't submit any order, it only resyncs NinjaTrader with your live Tradovate account so the platform sees the real position again. Your contracts stay open through the reconnect. Once the position reappears in NinjaTrader you press Flatten to actually close it, or you close it directly in the Tradovate web platform.
Trade on a stable, ideally wired connection, keep the Tradovate web platform open in a tab as a backup kill switch, and don't run two separate order sources against the same account at once. Turning on NinjaTrader's auto-reconnect helps it recover a dropped feed on its own. If you rely on flatten as an emergency exit, test that your connection recovers cleanly before you need it in a live trade.
This guide is for educational and informational purposes only and is not financial, investment, or trading advice. Trading futures and other leveraged products carries a substantial risk of loss and is not suitable for every investor. PickMyTrade is an independent third-party automation platform and is not affiliated with, endorsed by, or sponsored by Tradovate, Inc. or Bookmap. All related names, logos, and trademarks are the property of their respective owners. Platform features and steps change over time, so always confirm the current process in the official platform documentation before acting.