Skip to main content
Home / Guides / NinjaTrader 8 / PFX Copier
Guide · NinjaTrader 8 · about 15 minutes

Set up PFX Copier.One calm step at a time.

By the end, one NinjaTrader account trades and your other accounts follow it. You'll start in a safe "watch only" mode first, so nothing can trade until you say so. Take your time. There's no wrong speed.

~15 minstart to finish
7 stepstick each one off
Sim onlyno real money at risk
Freev1.01, source included
✓
You can't break anything doing this.

The copier never touches your lead account, and in DryRun it only prints what it would do. If a step doesn't look like the picture, that's normal: open the "Not seeing it?" box under it.

0

Before you start

Four quick things. Tick them as you go.

Find your account names

The copier needs each account's name exactly as NinjaTrader shows it: capital letters, numbers and all. They're in the Accounts tab, under Display name.

Control Center · Accounts
ConnectionDisplay nameCash value
Playback ConnectionSim101$100,000.00
Playback ConnectionSim102$100,000.00
These are your account names
Why exactly? If the name in the file is sim102 but NinjaTrader says Sim102, the copier can't find it. Copy and paste the name rather than typing it.
1

Download the copier

One small zip file, about 25 KB.

  1. Open the PFX Copier page and press Download free · v1.01.
  2. Find the file in your Downloads folder: PFX_Copier_NT8.zip.
  3. Right-click it → Extract All… → Extract.
You should see a folder with 4 files:
.csPFX_Copier.cs.csPFX_CopierCore.cs.txtcopier.txt.mdREADME.md
The PFX Copier page on precisionfx.io with the Download free button
Real screenshot · precisionfx.io/nt8/copier
Not seeing it?

Windows says the download might be unsafe. That warning appears for any new file from a small website. The files are plain text you can open and read. Choose Keep.

I can't find the zip. Press Ctrl + J in your browser to open your downloads list, then click the folder icon.

2

Put the two code files in NinjaTrader

Just copy and paste into one folder.

  1. Select PFX_Copier.cs and PFX_CopierCore.cs (hold Ctrl and click both).
  2. Copy them (Ctrl + C).
  3. Open this folder, and paste (Ctrl + V):
    Documents\NinjaTrader 8\bin\Custom\AddOns
    Tip: click the address bar at the top of File Explorer, paste the path, press Enter.
File Explorer
Documents › NinjaTrader 8 › bin › Custom › AddOns
.csPFX_Copier.cs
.csPFX_CopierCore.cs
other files already here
.csPFX_Copier.cs
.csPFX_CopierCore.cs
Ctrl+C then Ctrl+V
Both files are now in AddOns
Only these two. Leave copier.txt and README.md where they are for now. They go somewhere else in step 4.
Not seeing it?

I can't find the Documents folder. It's usually C:\Users\YourName\Documents. Or open NinjaTrader → New → NinjaScript Editor, right-click in the left list and choose Open Folder.

Windows asks for permission. Click Continue. It's your own Documents folder.

3

Tell NinjaTrader to read it

One key press. This is called "compiling".

  1. In NinjaTrader: New → NinjaScript Editor.
  2. Click anywhere in the editor, then press F5.
  3. Open New → NinjaScript Output. That's where the copier talks to you.
You should see this line in the Output window:
PFX Copier - v1.01 starting - config: …\PFX\copier.txt
NinjaScript EditorReady
namespace NinjaTrader.NinjaScript.AddOns
{
  public class PFXCopier : AddOnBase
  …
F5
NinjaScript Output
PFX Copier - v1.01 starting - config: C:\Users\you\Documents\NinjaTrader 8\PFX\copier.txt
PFX Copier - no …\PFX\copier.txt yet - see Copier/SETUP.md for the lines to put in it
That second line is expected. You'll fix it in the next step.
That "no copier.txt yet" message is good news. It means NinjaTrader loaded the copier and is waiting for your settings file.
Not seeing it?

I see red errors after F5. Make sure you copied both files into AddOns (not Indicators or Strategies). If it still errors, copy the red text and send it to us.

The Output window is empty. Press F5 once more with the NinjaScript Editor in front. It can take a few seconds.

Windows blocked it ("Smart App Control"). Windows can occasionally block new NinjaScript files. We're writing a guide for that. Until then, send us a message and we'll walk you through it.

4

Tell it which accounts to use

A tiny text file. Five lines.

  1. Open the folder Documents\NinjaTrader 8 and make a new folder called PFX (if it isn't there).
  2. Move copier.txt (from your download) into PFX.
  3. Open it in Notepad and make it look like this, using your account names:
1mode = DryRunWatch only. Nothing trades
2lead = Sim101The account you trade
3follower = Sim102 x1 loss=500Copies you, same size, stops for the day at a $500 loss

Wait about 10 seconds after you save. The copier re-reads the file on its own, with no restart.

NinjaScript Output
PFX Copier - mode DryRun, lead Sim101, followers: Sim102 x1 loss=500
10 s
The copier read your file
Careful with spelling. If mode is misspelled the copier plays safe and stays Off. It will say so in the Output window.
Not seeing it?

"lead account 'X' not found in NinjaTrader". The name doesn't match the Accounts tab. Copy and paste it from there (step 0).

"mode 'DryRn' is not Off / DryRun / On - staying Off". A small typo. Fix the word and save.

"unknown setting" or "skipped a line without '='". Every line needs the form word = value.

5

Test it without trading

Place one small trade on the lead and watch.

  1. Open a chart on Sim101 (for example MNQ).
  2. Buy 1 contract on Sim101.
  3. Look at the Output window.
You should see a "WOULD" line:
PFX Copier - WOULD Sim102 MNQ 12-26: BUY 1

"WOULD" means it would have. No order was sent to Sim102. That's the safe test.

Chart Trader · Sim101
MNQ 12-26 · Sim101
Qty1
NinjaScript Output
PFX Copier - WOULD Sim102 MNQ 12-26: BUY 1
Sim102flatno order sent
Watch only. Sim102 stays flat
Nothing appears? That's okay. Check the next box.
Not seeing it?

No "WOULD" line. Wait 10 seconds and try again. Check that step 4's Output line said mode DryRun.

"lead holds … the entry is too old to join". That's the copier's safety rule: it never chases an old trade. Close your position on Sim101 and take a fresh one.

I started the copier while already in a trade. Same rule. It joins the next trade, not the one in progress.

6

Switch it on, on your Sim accounts

Same test, but this time Sim102 really follows.

  1. Close any open trade on Sim101 so it's flat.
  2. In copier.txt, change mode = DryRun to mode = On and save. Wait ~10 seconds.
  3. Buy 1 contract on Sim101, with a stop and a target.
Within a couple of seconds, Sim102 should:
  • buy 1 contract
  • get its own stop and target at the same prices
  • move its stop when you move yours
  • close when you close the lead
Accounts · live view
Sim101 leadflat
Sim102 followerflat
Lead buysEntry copiedStop movedLead closes
Waiting for a trade…
Done well! This is the whole thing. Your real accounts use the same steps. Add them as extra follower = lines when you're ready, after checking your prop firm's rules (see the box below).
Not seeing it?

The follower didn't buy. Look in the Output window for an amber line. It will say why: "not connected", "not found", or "entry too old".

The follower bought but has no stop. Make sure the lead's stop and target are on the order (use an ATM or bracket). The copier copies what the lead has.

Your safety nets

Three ways to stop it.Always available.

Know these before you ever use real accounts. Press the red button to see what the emergency stop does.

1

Set the mode to Off

Change mode = Off and save. The copier stops doing anything. Open trades stay exactly as they are.

2

The daily loss stop

The loss=500 on each follower line. At that loss the follower is flattened and sits out until tomorrow.

3

The emergency stop

Create an empty file called copier.kill in the PFX folder. Every follower the copier opened is closed and copying stops until you delete the file.

PFX Copier - KILL SWITCH - flattening the copier's followers
Sim102 LONG 1Sim103 LONG 2
!

Before you use funded or prop-firm accounts

Many firms allow copying between your own accounts and ban copying anyone else's. Rules differ and change, so read your firm's current rules first. Start with one follower, small, for a week.

If something looks off

What the copier is telling you.In plain English.

Every line starts with PFX Copier -. Find yours here.

It saysWhat it meansWhat to do
no … copier.txt yetCopier is running, no settings file found.Do step 4.
lead account 'X' not found in NinjaTraderThe name in the file isn't in your Accounts tab.Copy the name from the Accounts tab.
follower 'X' not foundSame, for a follower.Same fix.
X is not connected - paused until it isThat account's connection is down.Reconnect it. The copier carries on by itself.
mode '…' is not Off / DryRun / On - staying OffA typo in the mode word.Fix the spelling and save.
entry is too old to join - waiting for the lead to be flatYou started it mid-trade. It never chases.Nothing. It joins the next trade.
follower already holds … left aloneThe follower has its own trade the copier didn't open.Nothing. It's never touched.
too small for this follower's size, skippedx0.5 of 1 contract rounds down to 0.Use fixed=1 or a bigger lead size.
All done

You're set up.Nicely done.

Next: use it on Sim for a few days, then add more followers one at a time.

Risk warning: Futures trading carries a high risk of loss and is not suitable for everyone. Copying trades copies losses as well as wins, across every follower. NinjaTrader is a registered trademark of NinjaTrader Group, LLC; PrecisionFX is not affiliated with or endorsed by NinjaTrader.