This article explains why a follower account can end up holding a position on the opposite side of the leader (also called a reverse, counter or inverted position), how to identify what caused it, and how to prevent it from happening again in Replikanto.
What the problem looks like
- The leader account is long, but the follower shows short (or the other way around).
- The leader is flat, but the follower is holding a brand-new position in the opposite direction.
- Replikanto turns the follower's status circle (the On column) yellow, which means it is out of sync with the leader while still receiving trades.
1 = the leader Sim101 is Long 2 ES 12-26 (Control Center > Positions); 2 = the follower Sim103 is Short 2 on the same instrument, the opposite side; 3 = Replikanto turns Sim103's status circle in the On column yellow (out of sync); 4 = Sim103's Side and Position columns show Short 2. Sim102 copied the trade correctly and stays green.
Why this matters: holding long and short positions on the same instrument across accounts at the same time is What is counter-position trading and how to avoid it?, which most prop firms (Apex, Topstep and similar) explicitly prohibit. If you see yellow or an opposite position, stop trading and resolve it before placing new orders.
Proactive prevention
Always verify all accounts are flat before entering a new trade. This is the most important safeguard against inverted positions. Before placing a new position, quickly scan all your follower accounts in Replikanto to confirm they show zero positions. This proactive check prevents mismatches from compounding across multiple trades.
Also check the Ratio column before each session: every value must be positive (for example 1.0 or 0.5). A negative ratio (for example -1.0) puts Replikanto in fade mode, so the follower deliberately trades the opposite side of the leader.
Before a new entry: 1 = Side and Position are empty for every follower, so all of them are flat; 2 = Sim104 has a negative Ratio (-1.00), so it would trade the opposite side of the leader (fade mode).
Why an inverted position happens
The follower's entry did not fill, but the exit was copied
An inverted position can occur when the market fills the leader's entry limit order and does not fill the follower's entry orders (copied from the leader), causing the leader's exit orders to be copied to the follower's accounts after submission due to position creation. When this happens, the exit orders may be filled before the entry order on the follower side, creating an unwanted position.
The follower position was closed manually while the leader stayed open
An inverted position can also occur when a follower's open position is manually closed while the leader's position remains open. When the leader's exit execution fires (for example, a Stop Loss or Take Profit is hit), Replikanto copies that exit order to all active followers, including the ones that were already manually closed. Since those accounts have no open position, the copied exit order opens a new trade in the opposite direction.
A stale position on a Rithmic connection
On Rithmic broker connections, NinjaTrader can keep showing a position that is already closed, and closing that "ghost" position sends a reverse order that opens a new one on the opposite side. Starting with Replikanto 1.7.0.0, Replikanto re-reads the real position from Rithmic before it flattens a follower, so a Replikanto flatten should no longer do this. See the section below.
The follower's own stop or target filled just before a close
If a follower's own stop or target filled a moment before a copied Close, a Flatten All or a Follower Guard flatten, NinjaTrader could still show the position from before that fill, and the close was sized on it, leaving the follower with a small opposite position. Starting with Replikanto 1.7.0.0, on connections other than Rithmic, Replikanto waits for NinjaTrader to apply that fill to the position (up to about 5 seconds) before it closes the follower; on Rithmic, the position re-read covers it. It can still happen in rare cases, so check the follower's position after a flatten.
First check: are the affected accounts on a Rithmic broker connection?
Whenever you see a reverse (counter) position, check whether the affected accounts connect through a Rithmic broker connection (common on prop firms such as APEX, TopStep and similar). With Rithmic, NinjaTrader can fail to update a follower's position after it closes, so it keeps showing a stale, "ghost" position. When something then tries to close that non-existent position, NinjaTrader sends a reverse order and opens a brand-new position in the opposite direction, so on Replikanto it looks exactly like an inverted follower even though your copy settings did nothing wrong. Also check whether a stop or target filled on the follower right before the close (see the previous section), which can leave a small opposite position on any connection. The cause is on Rithmic's side: its API does not guarantee that position updates arrive in step with fills, so NinjaTrader can be left holding a phantom position.
Starting with Replikanto 1.7.0.0, Replikanto re-reads the real position from Rithmic, with no order sent, before it flattens a follower (Flatten All, the follower's Flatten button, a copied Close or a Follower Guard flatten) and before Follower Guard acts on an out-of-sync follower. It also corrects NinjaTrader's position on its own about one second after a fill that is not followed by a position update. A Replikanto flatten on a follower should therefore no longer turn a phantom position into an inverted one. This is the Refresh a Rithmic account's position before acting on it option in Properties... > General, on by default.
So, before applying the steps below, confirm which broker connection the accounts use. If any of them are on Rithmic:
- On a Replikanto version before 1.7.0.0: a phantom position is very likely the real cause. Update Replikanto; until then, treat RTrader Pro as the source of truth and reconnect to refresh NinjaTrader's positions.
-
On 1.7.0.0 or later: look in NinjaTrader's Log tab for
Warning [1103](a phantom position was caught and corrected) orWarning [1101](the re-read switched itself off for that connection, which then behaves as before 1.7.0.0), and send those lines to support. Keep in mind that NinjaTrader's own Flatten Everything, Chart Trader and SuperDOM close buttons do not get this re-read.
For the full explanation, the limits and the manual workarounds, see Rithmic phantom positions: NinjaTrader shows a position already closed.
Market Only
You may find it helpful to use the Market Only: Copy Market Orders (Executions) only Replikanto feature, which allows you to copy only the executions to followers. This greatly reduces the likelihood of follower positions being in the opposite direction, because no resting order is left on the follower that could reverse the account. For more information, we invite you to view this informative video: Copy Market Orders (Executions) only.
How this works with bracket orders (stop loss and target)
With Market Only enabled, your leader's working stop loss and target (limit) orders are not copied to the followers as their own resting orders. Instead, Replikanto waits for the order to actually fill on the leader and then sends a market order to each follower to match. When your stop loss fills (exiting at a loss) or your target fills (taking profit or scaling out), each follower closes the matching quantity at market at that moment. Because no resting stop or target is left on the follower, there is no leftover order to reverse the account into the opposite direction.
Keep in mind that the follower closes with a market order rather than a resting limit, so its fill price can come in a tick or two different from the leader's, especially in fast-moving markets.
ATM Copy
The other preventive option is ATM Copy, which uses NinjaTrader's ATM Strategy to manage the follower's exit orders instead of copying them from the leader account. This is useful if you're using an ATM Strategy in the trades of the leader account, that is, trades placed on the NinjaTrader Desktop. ATM Copy only works for orders submitted within NinjaTrader Desktop; for trades sent from anywhere else it has no effect.
Follower Guard: reactive protection
The Follower Guard feature is designed to protect follower accounts and has an action that, when enabled, will close the position in the follower account if it becomes inverted (opposite direction). That action is available from Replikanto version 1.5.3 onwards.
Note: Follower Guard is reactive protection, meaning the counter position still occurs briefly before being closed. This is why proactive checks (verifying accounts are flat) and using Market Only are important for avoiding the situation entirely. Treat Follower Guard as a last resort, not as your primary protection.
How to configure it
- Right-click on the Replikanto window and select Properties....
- Open the Follower Guard group and enable the action for a follower that opens a position opposite to the one it should have, plus the action for a follower that becomes out of sync.
- Confirm that the accounts you want protected are turned on in the On column of your Replikanto setup — Follower Guard applies only to those.
- Click Apply and OK.
- Save your NinjaTrader Workspace so that the Follower Guard configuration is preserved the next time NinjaTrader starts.
Properties > Follower Guard: 1 = Flatten the follower if it becomes out of sync, and after how many seconds (default 10); 2 = Flatten the follower if its position is in the opposite direction, and after how many seconds (default 5); 3 = Apply; 4 = OK. Both actions are off by default.
For every available action and the disarm email alerts, see Follower Guard: Overview.
Tuning the Follower Guard timer
The "flatten after X seconds" delay sets how long a mismatched or opposite position can sit on a follower before the Guard closes it. A shorter delay reacts faster but can fire during the brief status-update window of a normal exit and flip the account into the opposite direction. A longer delay avoids those premature closes but lets a genuine wrong-side position linger for that timer before it is flattened, which shows up as the follower taking several seconds to exit.
Adjusting the timer alone does not remove the underlying mismatch, it only changes how the Guard reacts. The lasting fix is to prevent the mismatch with Market Only and by confirming every follower is flat before each new entry, so the Guard rarely has to act.
Telling a Guard flatten apart from a copied exit
On the follower chart, orders copied by Replikanto carry the Replikanto order ID suffix, while the Follower Guard's flatten appears as a plain Close order with no Replikanto tag. If you see a plain Close stacked on top of the copied Entry and Stop, that Close is the Follower Guard acting, not a copied order.
Comments
0 comments
Article is closed for comments.