This article explains why a Rithmic position can still appear open in NinjaTrader after it has already been closed on the broker side (RTrader Pro), why clicking Flatten All on that stale "ghost" position can open an inverted trade, why no NinjaTrader add-on (including Replikanto) can prevent it, and the workarounds we recommend.
What is happening
What is happening is that NinjaTrader is not being able to update the position of one or more followers after closing, thus keeping an outdated position status indicating that there is an incorrectly open position, and, when trying to close the "ghost" position, NinjaTrader sends a reverse close order causing a new inverted position to be opened for the simple reason that there was no position open at all at the broker's side. This behavior, as the NinjaTrader support team inform us, is due to "high connection latency".
The root cause: the Rithmic API design
The deeper reason behind these stale positions, and the main reason the position is sometimes not updated the way it should be, is in how the Rithmic API delivers events to NinjaTrader. As the Rithmic disclaimer above states, the sequence of events is not guaranteed by the provider's API design. NinjaTrader builds its view of your position from the stream of events it receives from the broker: execution events (OnExecution) and position-update events (OnPositionUpdate). When several fills happen at the same time for the same instrument, Rithmic can deliver these events out of order, or send a position update that does not reflect the executions that just occurred. Because NinjaTrader relies on that ordering to reconstruct the position, an incorrect OnPositionUpdate leaves NinjaTrader holding a wrong position while the broker (RTrader Pro) holds the correct one, this is exactly the mismatch you see on screen. This is why Rithmic itself recommends working only with the passed-by-value data from OnExecution rather than trusting the aggregated position update.
In other words, "high connection latency" is only part of the story: the real issue is that Rithmic does not guarantee the order in which these events arrive, so NinjaTrader cannot always rebuild the position reliably. Because the problem originates in the Rithmic API contract itself, no add-on running on NinjaTrader (including Replikanto) can prevent it, and it does not appear on providers such as Tradovate, whose APIs deliver these events differently.
Recommended workarounds
When this happens, always take what is displayed in the broker platform "RTrader Pro" as true. If NinjaTrader shows outdated positions, do not try to close them. The best way to refresh them is to reconnect to the broker or force a position update in one of these ways:
- Go to Connections > Disconnect, and then Connections > Connect.
- Or place a limit order distant from the price, and then cancel it.
Either action will ensure that the NinjaTrader positions are updated and displayed correctly. In short:
- Treat RTrader Pro as the source of truth for your real position.
- Do not repeatedly click Flatten All on a ghost position, it can open an inverted trade.
- Reconnect (or place and cancel a distant limit order) to refresh the position.
- Avoid relying on Follower Guard on Rithmic accounts.
A note on Follower Guard
On accounts affected by this issue (such as Rithmic accounts on APEX, TopStep and similar prop firms), avoid relying on Follower Guard to protect the followers. Follower Guard decides whether to flatten follower accounts based on the position state reported by NinjaTrader, and that is exactly the state that becomes unreliable due to Rithmic latency. As a result, it can trigger false alarms and flatten positions unnecessarily. In these cases, track the real position in RTrader Pro.
Does "Copy Market Orders (Executions only)" fix this? No.
Changing your Replikanto copy mode to Executions only does not fix or mitigate this issue. The stale "ghost" position lives in NinjaTrader's own local position state, which it rebuilds from the out-of-order events the Rithmic API sends. Copy-mode settings only control how the leader's orders are copied to followers, they do not change how NinjaTrader reconstructs a position from Rithmic, so they cannot prevent the ghost position or the inverted trade that Flatten All triggers. Use the workarounds above (RTrader Pro as the source of truth, do not repeatedly click Flatten All on a ghost position, reconnect to refresh, and avoid Follower Guard on Rithmic accounts).
Reporting the issue and staying informed
We have alerted our customers to this issue via the email entitled: "Important Notice: Position Update Issue - Temporary Workarounds Provided", where you will find more information about it. You can also follow this post related to this problem to stay up to date: https://forum.ninjatrader.com/forum/ninjatrader-8/platform-technical-support-aa/1309410-ninjatrader-rithmic-not-updating-positions
To be honest, there's nothing we can do with Replikanto in this situation, as it's up to NinjaTrader to update the positions correctly as shown in the broker's tool. Unfortunately we depend on the proper operation of the NinjaTrader Desktop platform that runs the Replikanto add-on for everything to work smoothly.
If this is affecting you in a negative way, please contact support@ninjatrader.com and send your logs to them. They will do their best to analyze them, identify the problem and force them to make the necessary fixes as they have known about this problem for some time.
If you're interested in exploring alternative options, you might want to consider using Tradovate accounts in place of Rithmic ones as a way to address the issue.
Why this is not a Replikanto issue
We would like to clarify that no market product running on NinjaTrader is responsible for Rithmic positions not being updated within NinjaTrader. We would like to kindly remind you that the responsibility for updating positions lies with the NinjaTrader tool. If the problem was with our product or any other, it would likely manifest across a range of account types, like Tradovate, which is not the case. This issue has its roots in Rithmic, and as previously mentioned, falls under the purview of NinjaTrader. Unfortunately, it is necessary to seek the assistance of a NinjaTrader support agent to report the case, as the NinjaTrader support AI is not currently equipped to handle this particular issue.
Comments
0 comments
Article is closed for comments.