This article explains the two buttons on a follower group header in Replikanto: Flatten (the group's ×) closes the positions and cancels the working orders of every account in one group, and Rearm re-arms the Disarmed accounts of the group that are flat. It also compares them with Flatten All, the row's × and the tab's Rearm button, and covers what to do when an account stays Disarmed after a group Flatten. Follower groups are available starting with Replikanto 1.7.1.0.
Where the buttons are
- Flatten: the × in the Flatten column of the group header row.
- Rearm: a text button next to the group name. It appears only while the group has at least one Disarmed account.
1 = the group's Rearm button (it appears because Sim103 is Disarmed), 2 = the group's Flatten x button.
Both buttons act only on the accounts of that group. The leader and the other groups are not affected.
Flatten a whole group
Click the × on the group header. Its tooltip reads: "Flatten every account of this group on the leader's instrument, whether it is On, Off or Disarmed: closes the position and cancels the working orders. Asks first. The leader and other groups are not affected."
- Replikanto asks first. A Yes/No window titled "Follower group 'Simulation'" (with the name of your group) says, for example: "Flatten the 3 follower account(s) in group 'Simulation' on MNQ 12-26? This closes their position and cancels their working orders. 2 of them currently hold a position or orders. The leader and other groups are not affected." The default answer is No.
- If the leader is still in a trade, the window adds: "The leader is still in a trade; accounts you flatten stay armed and will mirror its next orders."
- Click Yes to flatten, or No to do nothing.
The Flatten confirmation. No is the default button.
What it closes
- Every account of the group that has a NinjaTrader account, whatever its Status: On, Out of Sync, Disarmed and also Off. This is different from Flatten All, which does not touch accounts that are Off.
- Accounts with Market Only on are included.
- Never the leader account, even if it is listed in the group.
- The position and the working orders on the leader's instrument (or on the account's own Cross Order instrument, if it has one).
- Only follower accounts of this computer's list. Followers on remote nodes are not flattened by this button.
The flatten is sent to the accounts together, like Flatten All. For Rithmic accounts, Replikanto first re-reads the position from the broker, within a short wait. If that takes too long you may see a "Warning [1100]" in the Log tab and the flatten goes ahead with the position NinjaTrader currently shows.
Safety rules
- The button is disabled for about 2 seconds while the flatten runs, so a double click cannot send it twice. The group editing items (edit, rename, delete) are disabled during that time too.
- If you change the leader's instrument while the question is open and then click Yes, nothing is flattened. A message says: "The leader instrument changed while the confirmation was open, so nothing was flattened. Click Flatten again to flatten the group on the new instrument."
- If an account joined the group while the question was open, nothing is sent either. Click Flatten again.
- If the leader has no instrument selected in the tab, nothing happens, and the Log tab says there is no instrument to close.
- If the group has nothing to flatten (for example it holds only the leader account, or only accounts that are not connected), there is no question; the Log tab shows the result.
Disarmed accounts after the Flatten
A Disarmed account is re-armed by the group Flatten only if its position reads flat afterwards. Flatten only guarantees that the close order was sent, not that it filled. If the account still shows a position (or its position cannot be read), it stays Disarmed and the Log tab shows:
Warning [1125] Flatten Group left this follower Disarmed because it still shows an open position, or its position could not be read; check it by hand, then re-arm it from the Rearm button.
Check the account in NinjaTrader. When it is flat, click the group's Rearm button or the tab's Rearm button. A Disarmed account never re-arms by itself later.
Rearm a whole group
Click Rearm on the group header. Its tooltip reads: "Rearm the Disarmed accounts of this group that are flat. A Disarmed account that still holds a position stays Disarmed."
- Disarmed accounts that are flat are re-armed (they go back to On).
- Disarmed accounts that still hold a position (or whose position could not be confirmed) stay Disarmed. A window lists them: "Still Disarmed: they hold a position, or being flat could not be confirmed. Flatten it, or use the tab's Rearm button".
- Rearm does not send any order. It only changes the status of the accounts.
- It is blocked while a Flatten of the same group is running.
When no account of the group is Disarmed, the Rearm button is not shown.
Which button does what
| Button | What it closes | Accounts that are Off | Leader | Disarmed accounts afterwards |
|---|---|---|---|---|
| Flatten All (the tab's button) | The leader and every follower that is not Off | Not touched | Closed | Re-armed only if the position reads flat (otherwise Warning [1073]) |
| × in an account row | That one account | Works on an Off account too | Not applicable | Always re-armed |
| × in a group header | Every account of the group, after a question | Closed too | Never closed | Re-armed only if the position reads flat (otherwise Warning [1125]) |
| Rearm (the tab's button) | Nothing | Unchanged | Unchanged | All re-armed, with or without a position |
| Rearm in a group header | Nothing | Unchanged | Unchanged | Only the flat ones are re-armed; the others stay Disarmed and are listed |
For the full behavior of Flatten All, see the article "Why doesn't the "Flatten All" button work?".
Troubleshooting
The account is still Disarmed after I flattened the group
It still showed a position when Replikanto checked, or its position could not be read. Look for Warning [1125] in the Log tab. Confirm in NinjaTrader that the account is flat, then click the group's Rearm button or the tab's Rearm button.
The group's Flatten button is gray
Either a group Flatten is running (wait about 2 seconds), or the group has no account with a row in the list (for example all of its accounts are disconnected).
I clicked the Flatten button and nothing happened
Check that the leader has an instrument selected in the tab. Without one the button does nothing and the Log tab explains it. If a question appeared and you chose No, nothing is sent.
The Rearm button is not on the header
It appears only while at least one account of the group is Disarmed. If you do not see it, none is.
The account I flattened is still copying
That is expected. A group Flatten closes the position and the working orders, but the account keeps its status. An account that is On stays armed and mirrors the leader's next orders. To stop copying to it, turn it Off.
Related articles
- Follower groups in Replikanto: by connection or custom: what groups and headers are.
- Apply a setting to a whole follower group at once: the other header actions.
- Create, edit and delete custom follower groups: building your own groups.
- Why doesn't the "Flatten All" button work?
Comments
0 comments
Article is closed for comments.