StopWarden

Troubleshooting

Start here every time:


autopilot doctor
autopilot status

doctor finds most setup problems and says how to fix each one. status shows the current phase, whether the strategy is on, positions, whether the kill switch is set, and today's counters (attempts, capped, blocked).


Where the logs live

Everything is in C:\ProgramData\StopWarden\state\ (or your paths.state_dir).

FileWhat's in it
autopilot.logThe supervisor and every autopilot command: schedule, each NinjaTrader action with its RESULT= token, every alert text. Rotates at 5 MB, keeps 5 (autopilot.log.1 ... .5).
watchdog.logThe watchdog: start-up, NinjaTrader restarts, every naked-position decision and flatten. Same rotation.
orderkill_events.logOne line per order-guard event (AddOn loaded, orders cancelled, cancel failed). These are forwarded as alerts.
orderkill.logThe AddOn's detailed diagnostics. Rolls to .1 at 5 MB.
supervisor_state.jsonToday's counters: attempts, consecutive failures, backoff, capped, blocked, end-of-day done.
watchdog_heartbeat.jsonThe watchdog's last check: time, and per account net, covered, naked, instrument.
STOPThe kill switch. If it exists, nothing is enabled.
login_rejected.flagPresent after NinjaTrader rejected the stored login. Sign-in won't type again until you re-store it.
uia.lockShort-lived lock so two screen actions never click at once. Goes stale on its own after 120 s.

NinjaTrader's own log is in <Documents>\NinjaTrader 8\log\ (files log.YYYYMMDD.NNNNN.txt). StopWarden reads positions, orders, connections and strategy starts/stops from it.

The logs show each action's RESULT= token. The more detailed REASON that some scripts produce is not currently

written to autopilot.log. If a FAILED result below lists several possible reasons, check each one.


Doctor checks

CheckStatusCauseFix
Python versionFAILPython older than 3.10 is running StopWardenInstall 3.10+ (winget install -e --id Python.Python.3.12), open a new window. See also "autopilot is not recognized" below.
Clock / timezonealways PASSInformationalCheck that the time and timezone shown are the ones your schedule is written in.
End-of-day timeFAIL or WARNOn at least one day in the next year, your disable_at, turned into US Central time, is at 16:00 Central or later (FAIL: inside CME's daily halt, or the strategy runs through the daily close), or at 15:55 to 15:59 Central (WARN). This often happens only in the weeks when the US and your country change clocks on different dates; the row names those dates. A close sent during the halt cannot fill.Set schedule.disable_at to the safe local time the row suggests, for example 15:05 on a Central clock (16:05 Eastern, 13:05 Pacific, 20:05 London), and before your prop firm's own flat-by time. Then restart StopWarden.
Early closesFAIL in Protect, WARN in WatchAn entry in schedule.early_closes is ignored: the date is not YYYY-MM-DD, or the time is not HH:MM. On that day the end of day would come after CME has closed, so the close could not fill.Fix the entry: "2026-11-27": "12:00", the close time in US Central. See Configuration.
Early-close calendarWARNNo CME early-close dates are listed, or the last one is less than 60 days awayUpdate StopWarden and copy the new dates from its config\autopilot.example.json into your settings, or add CME's next early closes yourself.
Windows sessionFAILThis Windows session is disconnected: a Remote Desktop (RDP) window was closed without signing out. There is no desktop, so StopWarden cannot click NinjaTrader.See RDP session disconnected below: tscon <id> /dest:console.
Automatic sign-inWARN (Protect only)Windows does not sign in by itself after a restart, so after a night-time Windows Update restart StopWarden does not run until you sign inSee After a Windows restart nothing runs below.
Outside heartbeatWARN (Watch and Protect)alerts.heartbeat_url is empty, so nothing tells you when this PC is off, asleep, restarted or crashedSet it to a free ping address (e.g. healthchecks.io). See I didn't hear anything.
ConfigFAILconfig not found, not valid JSON, or a list of config problemsFix every listed line. Configuration explains each setting. JSON tip: no trailing commas; backslashes in paths are doubled (\\).
NT8 programFAILnt8.exe path is wrongSet nt8.exe to your NinjaTrader.exe.
NT8 user folderFAILYour NinjaTrader 8 data folder wasn't foundStart NinjaTrader once as this Windows user. If the folder is elsewhere, set nt8.user_dir to it (usually <Documents>\NinjaTrader 8) or re-run the installer with -Nt8UserDir <folder>.
NT8 log folderFAIL<user folder>\log is missingStart NinjaTrader as this Windows user and connect. If it already runs, set nt8.user_dir to the folder that holds its log folder. autopilot learn says "No NinjaTrader log files were found" in this case.
NT8 newest logWARNNo log yet, or the newest is over an hour old. The row says whether NinjaTrader is running right nowNormal when NinjaTrader isn't running. If it is running and the log is still old, check nt8.user_dir.
Cancel orders on disableFAILNinjaTrader's cancel-on-disable settings aren't both on in Config.xmlTools > Options > Strategies > NinjaScript: tick Cancel entry orders when a strategy is disabled and Cancel exit orders when a strategy is disabled, OK. If doctor still fails, close NinjaTrader normally so it saves its settings, and re-run.
Cancel on disable (strategy row)FAIL in Protect, WARN in Watch (fix it before you turn Protect on)Your strategy row is running with one of those options off, even though the settings are now on. NinjaTrader copies the two options into a row when the row is added, and prints the row's own values in its "Enabling NinjaScript strategy" log line.Remove the strategy from the Strategies tab and add it again (with both options on). Then autopilot resume. In Protect, a WARN here just means the row has not started in this NinjaTrader session yet; it is checked after every enable. In Watch, a WARN that names =False means the row has the option off: fix it before you turn Protect on.
ATI (for emergency flatten)WARNAT Interface is off (or its setting wasn't found)Tools > Options > Automated trading interface > tick AT Interface, OK. Without it, flattening uses slower screen clicks.
ConnectionsFAILA connection name contains Simulated or PlaybackUse a live data connection (e.g. My NinjaTrader) and trade Sim101 on it.
TargetPASS, or WARN while the strategy is still the example nameShows the strategy and account StopWarden will manageSet your strategy's name (autopilot learn lists the names it saw in NinjaTrader's log). Check the spelling against the Strategies tab.
NinjaTrader login storedFAIL in Protect onlylogin.method is credential, mode is protect and nothing is stored (or no username). Protect starts NinjaTrader at launch_at and the launch would block the day with NO_CREDENTIAL. In Watch it passes with "not needed in Watch": Watch never signs in to NinjaTraderProtect only: autopilot store-secret nt8. See Protect can't sign in to NinjaTrader below.
Telegram alert secret / Discord alert secretFAIL in Protect, WARN in WatchShown only when it adds something to the Alerts row: Telegram was linked before and its token is gone, or another channel works but this one has no secret. A channel that was never set up is part of the Alerts row.Telegram: autopilot link-telegram (create a bot with @BotFather first). Discord: autopilot store-secret discord.
AlertsFAIL (Watch and Protect)No working alert channel: neither Telegram nor Discord is both switched on and stored, so StopWarden can't reach your phoneLink Telegram in the StopWarden window (or autopilot link-telegram), or store a Discord webhook with autopilot store-secret discord (this also switches alerts.discord on). Then autopilot test-alert. The PASS row shows which channels work, the phone_min_level, and whether the outside heartbeat is on.
State folder writableFAILYour user can't write to the state folderRe-run install.ps1 as Administrator (it sets the folder permissions), or fix paths.state_dir.
Kill switchWARNSTOP existsDeliberate? Leave it. Ready to trade? autopilot resume.
Order-guard AddOnWARNThe AddOn file isn't in bin\Custom\AddOnsRe-run install.ps1 (answer y), then compile with F5 in the NinjaScript Editor.
Order-guard configWARNorderkill.json is missing or switched offNormal before StopWarden's first start. It is written when the supervisor starts (autopilot ensure-running).
LicenceWARN StopWarden couldn't renew its licence check ...The signed licence check that the NinjaTrader add-on needs runs out within the hour, or already has, and StopWarden couldn't renew it (usually no internet). The row shows the time the backup stop stops placing stops.Check this PC's internet connection. It fixes itself at the next successful licence check (every 30 min). Protect itself keeps its 3-day offline grace.
Engine AddOnFAIL NinjaTrader backup stop is not active: <reason>StopWarden asks the add-on to arm, but the add-on says it is in shadow. The reason says why: an expired or missing licence check, the add-on not yet loading engine.json, or a build that didn't pass the compatibility check.Do what the reason says. For the licence, check the internet connection. For a build mismatch, press F5 in the NinjaScript Editor or restart NinjaTrader.
Scheduled taskWARNStopWarden Supervisor or StopWarden Keepalive is missingautopilot install-tasks (normal window, as the user who runs NinjaTrader).
Strategy row (--ui only)WARNNinjaTrader isn't open and signed inOpen and sign in, run autopilot doctor --ui again.
Strategy row (--ui only)FAIL NOTFOUNDNo row matches the strategy and accountAdd it in the Strategies tab (QUICKSTART Step 2), or fix the spelling in targets. Both must match exactly, including case.
Strategy row (--ui only)FAIL AMBIGUOUSTwo or more rows matchRemove the duplicate rows, save the workspace.
Strategy row (--ui only)FAIL FAILEDThe row couldn't be readSee FAILED under nt8_strategy below.

Alerts and states

CRITICAL BLOCKED for today at <step> (<RESULT>). <fix>. Then run: autopilot resume

Cause: a problem that retrying can't fix (see the RESULT tables below). StopWarden stops trying until you act. Fix: do what the alert says, run autopilot doctor, then autopilot resume. A running supervisor clears the block on its next tick (within ~15 s); no restart needed.

CRITICAL Recovery CAP hit (N attempts today, last: <step> <RESULT>) ...

Cause: recovery.max_attempts_per_day (default 6) recovery attempts used up today. The strategy is off for the rest of the day. If a position was open, it was left alone and the alert says Hands needed. Fix:

  1. Look at autopilot.log for the repeated failure (search for RESULT=).
  2. Fix the cause.
  3. Run autopilot resume to reset today's counters. A running supervisor picks it up within ~15 s.
  4. StopWarden then re-enables if it's still inside the trading window and the account is flat.

CRITICAL Recovery CAP hit: StopWarden closed an unprotected position on <account> and turned <strategy> back on 3 times today ...

Cause: three times today the watchdog closed a position that had no working stop, and StopWarden turned the strategy back on each time. A strategy whose positions keep losing their stop needs a look before it trades again, so StopWarden leaves it off for the rest of the day. Fix:

  1. Look in autopilot.log for NAKED lines, and in NinjaTrader's log for what happened to the stop just before.
  2. Fix the cause in the strategy or its settings.
  3. Run autopilot resume. A running supervisor picks it up within ~15 s.

WARN <step> failed N times in a row (...). Backing off 30 min ...

Cause: max_consecutive failures in a row. Fix: nothing, if it recovers. If it keeps failing, find the failing RESULT= in autopilot.log.

CRITICAL KILL SWITCH (STOP file) is set: ... / CRITICAL Stopped by command: ...

Cause: someone ran autopilot stop, created a STOP file, or the balance floor fired. Nothing is enabled until you resume. The alert lists what was done (disable result, cancel-all, flatten). Fix: when you're ready, autopilot resume. To check whether it's set: autopilot status ("kill_switch": true) or autopilot doctor (Kill switch line).

REFUSED: <account> holds <qty> <instrument> ...; disabling the strategy will cancel its stop ...

Cause: you ran autopilot stop with a position open, and this stop would not close it (Watch mode, or flatten_on_disable: false). NinjaTrader's cancel-on-disable would cancel the strategy's stop and leave the position unprotected, so nothing was done. Fix: autopilot stop --flatten to close the position too, or autopilot stop --leave-open if you will manage it by hand.

CRITICAL UNPROTECTED under STOP: ...

Cause: the kill switch is set and a position on the account has no stop (its stop was cancelled with the disable). Under STOP the watchdog never flattens. The alert repeats every 5 minutes until the account is flat. Fix: close the position by hand now, or run autopilot stop --flatten.

CRITICAL BALANCE FLOOR: <account> balance X < floor Y. ...

Cause: the Accounts grid showed a balance below balance_floor.floor. The strategy was disabled, STOP was set, and orders were cancelled and the position closed (the balance floor always flattens). Fix: check the account at your broker. Decide whether to keep trading. Then autopilot resume.

WARN Windows desktop is LOCKED: UI actions ... are paused

Cause: the screen is locked, or there is no interactive desktop. Fix: unlock it. Set Windows to never lock during trading hours.

CRITICAL Naked position flattened via OIF|UIA. ...

Cause: the position wasn't covered by working stops for StopWarden's wait, or for that long in total within one minute. Check watchdog.log and NinjaTrader's Orders tab to see why the stop disappeared (rejected change, strategy error, manual cancel). If the watchdog flattens healthy trades:

  • Your strategy may protect positions with orders that aren't Stop Market/Stop Limit. List their name prefixes in watchdog.extra_stop_name_prefixes (a list of text values, each at least 2 characters, for example ["SL_"]). A profit target named with one of them still does not count as a stop.
  • Your strategy's stops may sit in Trigger pending, which can mean NinjaTrader holds them on this PC. StopWarden counts such a stop only while the connection named in nt8.connections is seen up in NinjaTrader's log. Copy the name exactly. autopilot doctor fails its "Connection seen" check when the name does not match and such stops were seen, autopilot learn says so in its summary, and Protect stays closed until the name matches.
  • Your strategy may take longer than StopWarden's wait to place its stop after entry. StopWarden does not wait longer than that. Run autopilot learn: a strategy whose stop, doubled, does not fit inside the wait is mode SLOW, and Protect stays off for it (Watch keeps alerting).
  • Your strategy may cancel and re-place its stop many times a minute, so the short gaps add up to the wait. The Learn report checks this too: a total that, doubled, does not fit inside the wait in any one minute is also mode SLOW.
  • You may be trading the account by hand without a stop. Don't do that on the configured account (see Safety).

CRITICAL NAKED POSITION, flatten did NOT clear it (STILL_BAD:<RESULT>) / ... 3 flatten attempts failed -- hands needed now

Cause: neither ATI nor the screen-click fallback cleared the position. Fix: flatten it yourself, now, in NinjaTrader or at your broker. Then check that AT Interface is on and the desktop is unlocked. <RESULT> is the fallback's token (see nt8_flatten below).

CRITICAL NAKED POSITION (watchdog.flatten is off, NOT flattening)

watchdog.flatten is false, so this is alert-only. Act yourself.

WARN Protect is on but cannot act yet: <reason>. Until then StopWarden only alerts, after a short wait with no working stop.

Cause: mode is protect and the licence is active, but the Protect gate is closed for the reason shown, most often Learn report not accepted yet. Until it opens, nothing is closed or cancelled: naked positions get an alert only. autopilot doctor shows the same reason on its Protect gate line. Fix: run autopilot learn; once the report is complete, read it and run autopilot learn --accept. If the reason is a Watch-only strategy mode (STOPLESS, UNSTABLE, ATM, or SLOW: strategies whose own stop takes too long to be working) or two instruments on one account, Protect stays off for this setup in this version. See Safety.

A naked-position alert with no flatten also happens, by design, when the watchdog runs without the supervisor (autopilot watchdog started by hand) or while the kill switch (STOP) is set.

CRITICAL Order guard: ...

The AddOn cancelled working orders on your account while no strategy was running (or a cancel failed). Expected after a strategy stops with orders left behind. If you placed those orders by hand, see SAFETY section 4: manual orders on the configured account are cancelled whenever no strategy is running.

CRITICAL END OF DAY PROBLEM: ...

Cause: the disable failed, and/or an account still shows a position after cancel + flatten. Fix: check NinjaTrader and your broker now. Disable the strategy by hand if it's still on. Flatten by hand if needed.

CRITICAL END OF DAY: NT8 is NOT running ... CHECK YOUR BROKER NOW

Cause: NinjaTrader was closed or had crashed at disable_at. Orders already at the broker can still fill. Fix: log in to your broker (or open NinjaTrader) and check for open positions and working orders.

WARN Watchdog (pid N) heartbeat is stale (...): restarting it. / CRITICAL Could not start the watchdog

The supervisor restarts a watchdog that stopped writing its heartbeat. If it can't start, check that Python works (autopilot version) and see watchdog.log.

WARN StopWarden couldn't renew its licence check; the NinjaTrader backup stop will stop placing stops at HH:MM unless it renews ...

Cause: the NinjaTrader add-on only places backup stops with a signed licence check, which lasts 12 hours and is renewed about every 2 hours. This one runs out within the hour, or already has, and every renewal since failed (usually no internet, or the licence server was down). Accounts the add-on already guards keep it for 24 hours past that, but only while NinjaTrader stays open: a restart drops them at once. Sent once a day. Protect itself is not affected: its offline grace is still 3 days. Fix: check this PC's internet connection. Nothing else is needed: the next successful check (every 30 min) clears it. Avoid restarting NinjaTrader until then.

CRITICAL NinjaTrader backup stop is not active: <reason>. ...

Cause: StopWarden asked the NinjaTrader add-on to arm (Protect on, emergency stop on, not shadow), but the add-on has reported for 3 minutes that it is in shadow. The reason names why, most often an expired licence check after a NinjaTrader restart, the add-on not having loaded engine.json, or an add-on build that didn't pass the compatibility check. (engine: ...) at the end is the add-on's own line from engine.log in the state folder. Sent once per episode. Fix: do what the reason says (internet for the licence; F5 in the NinjaScript Editor or a NinjaTrader restart for the build). Your strategy's own stops and the outside watchdog keep running meanwhile. autopilot doctor shows the same reason on its Engine AddOn row.

INFO NinjaTrader backup stop is active again: ...

The end of that episode: the add-on reports it is armed again. Sent only after the CRITICAL above.

ERROR Supervisor error (continuing): ...

An unexpected error in one supervisor tick. It keeps running. The same error text goes to your phone at most once an hour (every occurrence is still in autopilot.log). If it repeats, send a support bundle.

CRITICAL|WARN NinjaTrader is NOT running ... / ... is NOT RESPONDING ... / ... is open but NOT signed in ...

Cause: StopWarden checks NinjaTrader on every supervisor tick (every 15 s), at every hour, including nights and weekends. It warns once per outage: at once when the NinjaTrader process is gone, after 30 s when Windows reports it "Not Responding", and after 2 min on the sign-in screen. It is CRITICAL when the last position in NinjaTrader's log was open, otherwise WARN. If NinjaTrader was never opened since StopWarden started and nothing is held, there is no alert. Fix: CRITICAL: check your broker now. Stops held inside NinjaTrader don't work while it is down. Orders already at the broker keep working. Then reopen NinjaTrader. In Protect, inside the schedule window, StopWarden relaunches it as before.

INFO NinjaTrader is back (it was <not running|not responding|not signed in> for N min). ...

The end of the outage, with whether a position is open. It goes to your phone whenever the outage alert did.

CRITICAL|WARN Connection is back. ...

Sent after Connection lost while ..., or when a position is held at reconnect. It says whether a position is still open and whether it has a working stop. CRITICAL = a position with no working stop: check it now. "No open position on the configured account" means you are flat. A short disconnect while flat sends nothing.

CRITICAL Connection lost while ... The connection keeps dropping (N drops in the last 10 minutes) ...

The connection dropped a second time within 10 minutes. StopWarden does not send a message for every drop and return after this one. It sends one more message once the connection has stayed the same for a minute: Connection is back and has held steady for a minute. ... if it is up, or Connection lost while ... It has stayed down for a minute ... if it is down. Until then, treat the connection as down and check your broker. A message that ends (Again at HH:MM:SS.) repeats words sent in the last 10 minutes. It is a new event, not a resend.

[LATE: first raised <date time>, not delivered then] ...

This alert couldn't be sent when it happened (no internet, or Telegram/Discord down). It waited in the outbox (alerts_outbox.json in the state folder) and was retried with a growing wait. Read it as of the time shown, not now. Up to 50 undelivered alerts are kept, INFO dropped first. To see what is still waiting, look at that file or autopilot.log (alert not delivered: kept in the outbox).

I didn't hear anything, but the PC was off / Windows crashed

A dead PC can't send an alert. Set alerts.heartbeat_url to an https:// ping address from your own monitoring service (e.g. a free healthchecks.io check, with its "period" at 2-5 minutes). The supervisor opens it every 60 s. When the pings stop, that service alerts you. See Configuration. If it still alerts while StopWarden is running, check that the address starts with https://, that the PC can reach it, and that autopilot.log doesn't say heartbeat ping skipped: no tick has finished.

RDP session disconnected

Cause: you closed the Remote Desktop (RDP) window without signing out. Windows keeps the session running but disconnected: there is no desktop, so StopWarden cannot click NinjaTrader (sign in, enable, disable). At end of day it keeps sending the close through NinjaTrader's file interface every 60 s and sends END OF DAY BLOCKED with this fix. autopilot doctor FAILs its Windows session row. Fix: reconnect over RDP. To leave without disconnecting the desktop, run this in an Administrator Command Prompt inside the RDP session instead of closing the window:


query session
tscon <id> /dest:console

query session shows the id of your session (the line marked >); doctor's row and the alert print it for you. The RDP window closes and the session moves to the PC's own console, still signed in and unlocked. On a VPS, keep the screen from locking during trading hours as well.

After a Windows restart nothing runs

Cause: StopWarden's scheduled tasks run on your own desktop (they start when you sign in; they never store your Windows password). After a restart, for example a Windows Update restart at 3 a.m., nobody is signed in, so the supervisor doesn't run, NinjaTrader isn't opened, and no alert is sent until you sign in. autopilot doctor WARNs Automatic sign-in in Protect. Fix: any of these, best together:

  • Turn on automatic sign-in with Microsoft's free Sysinternals Autologon (it keeps the password encrypted, not in plain text in the registry). Anyone with access to the PC can then use it, so only do this on a PC you control. StopWarden only reads whether automatic sign-in is on; it never reads or stores your Windows password.
  • Set Windows Update's active hours to cover your trading hours, so it doesn't restart then.
  • Set alerts.heartbeat_url, so a PC that is down gets noticed (next entry).

Protect can't sign in to NinjaTrader (NO_CREDENTIAL)

Cause: in Protect, StopWarden starts NinjaTrader at launch_at and signs in with the NinjaTrader login saved in Windows Credential Manager. The StopWarden window has no password field on purpose, so the login has to be saved once from PowerShell. Without it the launch answers NO_CREDENTIAL and the day is blocked. autopilot doctor FAILs NinjaTrader login stored. Fix: in a normal PowerShell window, as the same Windows user that runs StopWarden:


autopilot store-secret nt8
autopilot resume

It asks for the username and the password (twice). Not needed in Watch, which never starts or signs in to NinjaTrader, or when nt8.login.method is google or none.

Routine INFO alerts don't reach my phone

By design: alerts.phone_min_level is "WARN" by default. INFO lines stay in the log and the window's activity list. Set it to "INFO" to get everything. A few INFO lines (strategy enabled, end-of-day flat, the daily summary) reach the phone at "WARN" too, and stay off it at "ERROR" or "CRITICAL". The daily "still running" message, a settings change that turns Protect off, and autopilot test-alert always go out.

The Alerts light in the window is amber or red, though my last test alert worked

Round 14: the light also counts alerts that could not be delivered. One or two alerts waiting 15 minutes or more turn it amber; three or more, or any alert waiting an hour, turn it red, and the line under it says how many and for how long. Check this PC's internet connection and your Telegram or Discord settings, then press Send test alert. The light clears once the waiting alerts are delivered.

WARN NT8 log quiet / CRITICAL StopWarden is reading a different folder than NinjaTrader is writing to

StopWarden reads NinjaTrader's log. If NinjaTrader writes to a different NinjaTrader 8 folder (a different Windows user, a Documents folder moved by a cloud-sync program, or a second copy), StopWarden sees nothing and protects nothing, while looking healthy. Two checks now exist. autopilot doctor shows NT8 log folder in use FAIL, and StopWarden sends one CRITICAL alert, when another NinjaTrader folder has a log that was written in the last 15 minutes while the watched one has been quiet for 30. Doctor shows NT8 log quiet WARN when NinjaTrader is running, the CME market has been open 8 hours or more and the log has had no writes for that long. It stays silent while the market is closed (the weekend and the 16:00-17:00 Central break). Fix: set nt8.user_dir in your settings to the folder named in the message, then autopilot restart.

NinjaTrader is running under another Windows user (a second login or Remote Desktop session)

StopWarden only counts the NinjaTrader that runs in the SAME Windows session as itself. A NinjaTrader left running by another user does not make StopWarden think yours is up, and it is never closed by nt8_close.ps1. If doctor says NinjaTrader is not running while you can see it, you are probably looking at the other session: run StopWarden in the same Windows session as NinjaTrader.

I installed 1.2.1 or earlier and never saw an update notice

Those versions do not show an update notice at all, so nothing on the server can make them show one. The notice was added in 1.2.2; versions before it never ask. Update once by hand from the Download page on the StopWarden site (run the installer again); every version from 1.2.2 on tells you when a newer one is out.

The strategy wasn't enabled this morning

Check autopilot status and search autopilot.log for enable not attempted:.

Verdict in the logMeaningFix
REFUSED_KILL_SWITCHSTOP is setautopilot resume
REFUSED_NOT_FLATThe log shows a position on the accountFlatten it. StopWarden enables once flat.
REFUSED_REJECTED_FEEDA connection name contains Simulated/PlaybackFix nt8.connections
REFUSED_WATCHDOG_NOT_COVERING (WAIT_WATCHDOG)The watchdog heartbeat is older than 30 sUsually clears in a minute. If not, see watchdog.log.

Also check: is today in schedule.days and not in holidays? Is the PC clock right? Is the desktop unlocked? Is the day blocked or capped in status?


RESULT tokens

These appear in autopilot.log (ps <script> -> RESULT=<TOKEN>) and in some alerts.

Any script

TokenMeaningFix
TIMEOUTThe step hit recovery.ui_timeout_seconds and was killedUsually a pop-up or modal covering NinjaTrader. Look at the screen. Close unexpected dialogs.
MISSING_SCRIPTA file in ps\ is missing (blocks the day)Re-run install.ps1.
ERROR / NO_RESULTPowerShell couldn't start, or the script printed no resultCheck Windows PowerShell 5.1 works. Send a support bundle.

Sign-in (nt8_launch_login.ps1)

TokenMeaningFix
LOGIN_REJECTEDNinjaTrader rejected the stored username/password. Latched: StopWarden won't type it again. Blocks the day.Check the login by hand, then autopilot store-secret nt8 (this clears the latch), then autopilot resume.
NO_CREDENTIALNo NinjaTrader login stored (blocks the day)autopilot store-secret nt8, then autopilot resume. Store it as the same Windows user that runs StopWarden.
NOT_INSTALLEDnt8.exe not found (blocks the day)Fix nt8.exe.
TIMEOUTThe Control Center didn't appear in timeNinjaTrader slow to start, an update prompt, or a Google page waiting. Look at the screen.
FAILEDCouldn't proceed safely: not an interactive, unlocked, active desktop session; login form not usable; focus lost while typing; a different program at the login window; NinjaTrader exited; bad parametersUnlock the desktop, reconnect Remote Desktop, close windows covering the login, check nt8.exe points to the NinjaTrader you run.

With google, repeated TIMEOUT or FAILED usually means Google showed a page StopWarden won't click (a new device check, a captcha). Sign in by hand, or switch to credential or none.

Connect (nt8_connect.ps1, nt8_disconnect.ps1)

TokenMeaningFix
NOT_FOUNDNo connection with that exact name in the Connections menu (blocks the day)Copy the name exactly into nt8.connections, then autopilot resume.
FAILEDClicked, but the log never showed Connected, or the menu couldn't be openedBroker/internet down, wrong credentials inside the connection, or a pop-up in the way. Try connecting by hand.
FAILED (disconnect)NinjaTrader asked "really disconnect?" with orders active and StopWarden answered No, because a position was openExpected. StopWarden doesn't force a disconnect with a position on.

Strategy (nt8_strategy.ps1)

TokenMeaningFix
HYGIENE_OFFCancel-on-disable settings not both on, or Config.xml not found (blocks the day)See the Cancel orders on disable doctor check. Then autopilot resume.
HYGIENE_OFF_INSTANCEThe strategy row itself runs with a cancel-on-disable option off (NinjaTrader's own Enabling line says so). If it was our enable, StopWarden disabled it again and cancelled its orders at once (blocks the day)See the Cancel on disable (strategy row) doctor check: remove the row and add it again. Then autopilot resume.
NOTFOUNDNo Strategies-tab row matches strategy and account (blocks the day)Add the row, or fix the spelling (exact, case-sensitive). Save the workspace. autopilot resume.
AMBIGUOUSMore than one row matches (blocks the day)Delete the duplicates, save the workspace, autopilot resume.
NOT_CONFIRMED_FLATThe account wasn't confirmed flatFlatten. Doesn't use up an attempt.
DIED_AT_STARTUPEnable was clicked, but within 75 s the strategy disabled itself, never logged a start, or the box turned OFFYour strategy is failing to start. Open NinjaTrader's Log tab for its error (data loading, a parameter, an exception). Test by enabling it by hand.
FAILEDPossible causes: kill switch present; NinjaTrader not running; no Control Center; another screen action held the lock too long; the enable box was covered by another window; the box didn't stay ON (NinjaTrader drops an enable when no live data connection is up); the box state couldn't be readCheck connections are live, nothing covers the Control Center, the desktop is unlocked.
ALREADY_ON / ALREADY_OFFNothing to do—

Flatten fallback (nt8_flatten.ps1)

TokenMeaningFix
FLATTEN_CLICKEDClose Position was clicked. StopWarden then checks the log.—
NO_POSITION_ROWNo matching row in the Positions tabFlat already, or the instrument name differs. Check at your broker.
FAILEDCouldn't click itFlatten by hand. Turn AT Interface on so the fast path works.

Balance (nt8_read_balance.ps1)

TokenMeaningFix
NOT_FOUNDAccounts grid shows other accounts but not yoursCheck the account name.
UNREADABLETab, grid or balance column not foundSet balance_floor.accounts_tab to your tab's name. Make sure the grid has a Net liquidation or Cash value column.

A failed balance read is only logged (balance read for ...). It doesn't stop trading, and it doesn't alert.


Install problems

SymptomFix
Installer exit 3 / "Run this from an elevated PowerShell"Right-click Windows PowerShell > Run as administrator.
Installer exit 2 / "Python 3.10 or newer was not found"winget install -e --id Python.Python.3.12, open a new window, run the installer again.
Installer exit 5 / "Cannot find the Windows account"Run the installer again with -RunAsUser DOMAIN\user: the Windows sign-in you use to run NinjaTrader (type whoami in PowerShell to see it).
Installer exit 1 / "A position is open: ..."The upgrade stops StopWarden for a minute or two, so the installer refuses to upgrade while a position is open on your account and changes nothing. Close the position, then run the installer again. Or run it with -LeaveOpen if you will watch the position yourself during the upgrade.
"Couldn't check for an open position; make sure your account is flat before upgrading"The installer could not read NinjaTrader's log for the Windows user that runs NinjaTrader (no settings yet, or that user's NinjaTrader 8 folder was not found), and it went on with the upgrade. Check in NinjaTrader that your account is flat. If your NinjaTrader 8 folder is somewhere unusual, run the installer with -Nt8UserDir "<your NinjaTrader 8 folder>".
Installer exit 1 / "The installed StopWarden refused to stop: it sees an open position"StopWarden saw a position open on your account, so it would not stop, and the installer changed nothing. StopWarden is still running and still watching your account. Close every position, then run the installer again. Or run it with -LeaveOpen if you will watch the position yourself during the upgrade.
Installer exit 6 / "StopWarden is still running and did not stop"Nothing was replaced, but StopWarden is OFF: the shutdown paused it, and the leftover process (the message names it and its pid) does not watch your account. To finish the upgrade, end that process in Task Manager, then run the installer again. It never copies over a running copy. To keep the old version instead, press Start in the StopWarden window, or run autopilot start from a normal window.
Installer exit 7 / "STOPWARDEN IS OFF" after an upgradeThe upgrade finished, but StopWarden is OFF: it was running before, and the installer could not start it again. Press Start in the StopWarden window, or run autopilot start from a normal (not administrator) window. The watchdog is OFF until you do.
After an upgrade: "Press Start in the StopWarden window"The installer starts StopWarden again if it was running before the upgrade, through your StopWarden scheduled task (never as administrator). This message means it couldn't: no such task for your Windows user, or StopWarden didn't come up in time. Press Start in the StopWarden window, or run autopilot start from a normal window. The watchdog is OFF until you do.
NinjaTrader AddOns folder not foundStart NinjaTrader once, or pass -Nt8UserDir "<your NinjaTrader 8 folder>".
Another file also defines StopWardenOrderGuardDelete the other file it names, then F5.
AddOn compile errors after F5Compile errors in other NinjaScript files also block the compile. Fix or remove those files.
'autopilot' is not recognizedOpen a new PowerShell window after installing (PATH changed). Still failing? autopilot tries, in order: the environment variable AUTOPILOT_PYTHON (full path to python.exe), python on PATH, then the py -3 launcher. Set AUTOPILOT_PYTHON if none of those works.
install-tasks: task command is N chars (schtasks limit 261)Re-install to a shorter folder with -InstallDir, e.g. C:\StopWarden.
store-secret says not storedEntries were empty, didn't match, or contained unsupported characters. Try again.

Sending a support bundle

Send:

  1. The full text output of autopilot doctor and autopilot status.
  2. From C:\ProgramData\StopWarden\state\: autopilot.log, watchdog.log, orderkill_events.log, orderkill.log, supervisor_state.json, watchdog_heartbeat.json (plus autopilot.log.1 if the problem was earlier today).
  3. C:\ProgramData\StopWarden\autopilot.json. It contains no secrets.
  4. If asked: that day's NinjaTrader log, <Documents>\NinjaTrader 8\log\log.YYYYMMDD.NNNNN.txt.
  5. autopilot version, and your NinjaTrader version (Help > About).

These files contain your account name, strategy name, positions and order details. If you use Google sign-in, autopilot.log also contains the Google account text from your config. Replace anything you don't want to share before sending.

Never send passwords, your Telegram bot token, your Discord webhook URL, or screenshots of Windows Credential Manager. StopWarden doesn't write these to its logs, and support will never ask for them.