A NinjaTrader 8 strategy that automatically replicates orders from a master account to one or more slave accounts in real-time.
- Real-time Order Replication: Automatically copies orders from a master account to slave accounts
- Multi-Account Support: Replicate to multiple slave accounts simultaneously
- Order Synchronization: Handles both order submissions and cancellations
- Collision Prevention: Uses prefixed order names to avoid infinite replication loops
- Thread-Safe: Implements proper locking mechanisms for account operations
ZETECReplicator monitors all orders placed on a designated master account. When an order is submitted or cancelled, the strategy automatically replicates that action to all configured slave accounts.
- Order Submission: When an order is submitted on the master account, identical orders are created on all slave accounts
- Order Cancellation: When an order is cancelled on the master account, corresponding orders are cancelled on slave accounts
- Download the
ZETECReplicator.csfile - Open NinjaTrader 8
- Go to Tools > Import > NinjaScript Add-On
- Navigate to the downloaded file and import it
- Compile the strategy: Tools > Compile
Before using the strategy, you need to configure your master and slave accounts in the code:
- Open the
ZETECReplicator.csfile in the NinjaScript Editor - Locate lines 40 and 43:
// MAIN ACCOUNT
private string masterAccountName = "Earn2Trade";
// SLAVE ACCOUNTS
private string[] slaveAccountNames = { "Bulenox" };-
Change the master account: Replace
"Earn2Trade"with your master account name -
Change the slave accounts: Replace
"Bulenox"with your slave account name(s)- For multiple slave accounts, use:
{ "Account1", "Account2", "Account3" } - For a single slave account, use:
{ "AccountName" }
- For multiple slave accounts, use:
-
Save the file and recompile: Tools > Compile
- Open a chart in NinjaTrader 8
- Right-click on the chart and select Strategies
- Click Add and select ZETECReplicator from the list
- Click OK to apply the strategy to the chart
- The strategy must be enabled and running on a chart for replication to work
- Make sure all account names match exactly (case-sensitive)
- The strategy will print error messages to the Output window if accounts are not found
- Orders replicated to slave accounts will be prefixed with
ZETEC_to prevent infinite loops
- Check the Output window (Tools > Output Window) for status messages
- If accounts are not found, you'll see messages like:
"Master Account not found"or"Slave not found: AccountName" - Place a test order on your master account and verify it appears on slave accounts
- Connect your accounts: Make sure both master and slave accounts are connected in NinjaTrader
- Open a chart: Any instrument, any timeframe
- Apply the strategy:
- Right-click on the chart → Strategies
- Click Add
- Select ZETECReplicator
- Click OK
- Verify activation: Look for the strategy name in the chart's indicator panel
- Start trading: Any order placed on the master account will now be replicated
- Right-click on the chart
- Select Strategies
- Select ZETECReplicator and click Remove
- Click OK
- Verify account names are spelled correctly in the code
- Check that all accounts are connected
- Look for error messages in the Output window
- Ensure the strategy is enabled on a chart
- Double-check the account names in lines 40 and 43
- Account names are case-sensitive
- Make sure accounts are connected before enabling the strategy
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2026 ZETECdev
Use at your own risk. This software is provided "as is" without warranty of any kind. Trading involves risk, and automated order replication can amplify both gains and losses. Always test thoroughly in a simulation environment before using with live accounts.
Created by ZETECdev
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.