SPARTACUS - trade copier and Chart Trader buttons for NinjaTrader 8
====================================================================

What it does
  - Copies your trades from a leader account to your other accounts: NinjaTrader accounts
    (Tradovate, any connection NinjaTrader holds) and Rithmic logins, with one dark window.
    A different leader per instrument if you want, and Replikanto-style copy methods.
  - Adds buttons to Chart Trader, right under ATM Strategy (stops to entry, Break Even, Close Half,
    Buy/Sell, Flatten All), and Clear errors for NinjaTrader's error pop-ups.
  - A free live squawk: Bloomberg Radio, live, one button (no window, no sign-in).
  Followers take MARKET orders only and hold no stop of their own at the broker.

You need
  - Windows 10 or 11, NinjaTrader 8.1 or later.
  - Microsoft .NET 8 Desktop Runtime (free): https://dotnet.microsoft.com/download/dotnet/8.0
    The installer checks for it and tells you if it is missing.

Install (once)
  1. Unzip this download anywhere (for example your Downloads folder).
  2. Double-click Install-Spartacus.cmd. No administrator rights are needed. It shows the licence
     (EULA.txt): type I AGREE to install.
  3. In NinjaTrader: Tools > Import > NinjaScript Add-On..., pick the file the installer shows
     (Documents\NinjaTrader 8\Spartacus\Spartacus-NinjaTrader.zip), then restart NinjaTrader.
  4. Control Center > New > Spartacus.

First use
  - Connections: your NinjaTrader accounts are listed by themselves. Add Rithmic logins there with
    Refresh: the password console opens by itself (the password is typed there, never into
    the window, and kept encrypted for your Windows user), Rithmic checks the login, read only, and
    only a login Rithmic accepts is saved.
  - Copier: pick the Leader (Spartacus starts with it, and again by itself each time NinjaTrader
    starts). The bridge starts by itself with NinjaTrader and is kept running, with no window (its
    log: right-click > Open the bridge's log). Copying is ON from the start: an account copies the leader
    as soon as its On box is ticked. To set up first, click COPYING at the top of the window (it shows
    COPY PAUSED), tick the accounts, then click it again when you are ready. Right-click to hide
    accounts you do not use.
  - Charts: the Spartacus buttons sit right under ATM Strategy in Chart Trader. NinjaTrader's own error
    pop-ups that only have OK close by themselves, each one written in the Log; Clear errors closes the
    rest, and a pop-up that asks a question is never touched. Right-click > Properties: "Chart buttons
    right under ATM Strategy" (off: the bottom of Chart Trader) and "Close error pop-ups by themselves".
  - Try everything on simulation accounts first.

First time with a Rithmic login (do it in this order)
  1. Close NinjaTrader.
  2. Open R|Trader Pro and log in with that Rithmic login. Accept every agreement or form it shows,
     until the account is ready to trade.
  3. Log out and close R|Trader Pro completely. Rithmic allows one connection per login at a time.
  4. Wait 30 seconds.
  5. Open NinjaTrader. In Spartacus > Connections fill in the login and press Refresh (called Check and save before 0.9.0).
  6. Once it is saved, give the accounts about 15 seconds to come in.
  7. Nothing, or it looks stuck? In the Copier, right-click > Restart the bridge. That often pushes
     it through.

Updates
  When a new version is out, Spartacus shows it when NinjaTrader starts: what changed, Install update
  and Later. If you have not installed it 3 days later, it installs itself. An install never stops
  anything that runs and never restarts NinjaTrader: the new version is used from NinjaTrader's next
  start, so restart it when you are flat ("Reopen NinjaTrader after I close it" brings it back by
  itself once you close it). Every update is checked against Spartacus's release signature before
  anything is installed. "Roll back" goes back one version, and a version you rolled back from is
  never put back by itself. Properties: "Install future updates as soon as they are out", and
  "Otherwise install them by themselves 3 days after they come out" (on unless you turn it off).
  If you imported Spartacus into NinjaTrader without running Install-Spartacus.cmd, Install update
  installs the program from the update window (checked the same way, your settings kept); where it
  cannot, "Download the installer" opens this download: unzip it, double-click Install-Spartacus.cmd.

If the bridge does not connect
  The top of the Spartacus window says why, in plain words. The usual reason is that the leader
  account is not connected in NinjaTrader yet: Spartacus starts with it, and the bridge connects
  then (whether the market is open makes no difference). The bridge keeps a log in
  %LOCALAPPDATA%\Spartacus\bridge.log.

Where things are
  %LOCALAPPDATA%\Spartacus\            the program, your settings (bridge.json), stored passwords
  Documents\NinjaTrader 8\Spartacus\   the add-on file to import, backups of earlier add-ons

Uninstall
  Uninstall-Spartacus.cmd (settings and passwords are kept unless you add -Everything), and in
  NinjaTrader: Tools > Remove NinjaScript Assembly > Spartacus.
