A personal risk management tool that forcibly stops you from trading on Tradovate the moment your daily P&L hits a configured threshold. Designed against tilt — it's deliberately hard to undo mid-session.
It does NOT place trades, generate signals, or run any strategy. It only enforces your own daily loss / profit limits using Tradovate's own broker-side Manual Lockout feature plus OS-level domain blocking.
⚠ Read the Terms of Service note below before using on any funded/prop account. Confirmed permitted with Tradeify (May 2026); other prop firms may have different policies.
When your Daily Total P&L crosses your configured limit (default PROD: -$350 loss / +$1,200 profit):
- Click your marked Flatten button — closes positions
- Walk Tradovate's Manual Lockout dialog — engages broker-side trading lock for the rest of the day
- Block Tradovate domains in
/etc/hosts(Mac) orC:\Windows\System32\drivers\etc\hosts(Win) — IPv4 + IPv6, web + 5 API endpoints - Make hosts file immutable in PROD mode (
chflags uchg/attrib +R) - Schedule auto-unblock for next day at 6 AM (
launchdon Mac,schtaskson Windows) - Open countdown timer in your default browser
After that point, you cannot trade on Tradovate from this machine — broker rejects orders, OS can't reach the domain.
- Python 3.8 or newer (download)
- Google Chrome installed (the script controls a real Chrome instance via Playwright)
- macOS or Windows 10/11
- Tradovate account (live or sim)
- Admin password on your machine (needed once per session to edit hosts file)
- Download or clone this repository
- Move the folder anywhere you like (Desktop, Documents, etc.)
- Open the folder in Finder → double-click
Setup.command- If macOS blocks it ("can't be opened"), right-click → Open → Open
- Wait ~2 minutes — it creates a venv, installs Playwright, downloads Chromium
- Disable iCloud Private Relay if you have iCloud+: System Settings → Apple ID → iCloud → Private Relay → Off. Without this, Safari bypasses the hosts block.
- Download or clone this repository
- Move the folder anywhere you like
- Open the folder → double-click
Setup.bat- If SmartScreen blocks it: "More info" → "Run anyway"
- Wait ~2 minutes for installation
Before each trading session:
- Mac: double-click
Start Tradovate Lockout.command - Windows: double-click
Start Tradovate Lockout.bat(UAC prompt — click Yes)
Then:
- Type your admin password (Mac) — Windows handles via UAC prompt
- Chrome opens to Tradovate. Log in (login is remembered next time)
- Press Enter in the terminal window
- Click 3 things in the Tradovate UI when prompted:
- Daily P&L value — the realized total (e.g.
DOLLAR TOTAL P Lcell) - Flatten button — whatever closes all your positions
- Manual Lockout button — top of Tradovate UI
- Daily P&L value — the realized total (e.g.
- Trade normally. The script monitors P&L every 2 seconds.
If you cross the threshold, the lockout fires automatically and you're done for the day.
Edit tradovate_lockout.py — top of the file has a MODE constant:
MODE = "PROD" # or "TEST"| Setting | TEST | PROD |
|---|---|---|
| Loss limit | -$10 | -$350 |
| Profit limit | none | +$1,200 |
| Hosts unblock | 15 min | 6 AM next day |
File hardening (chflags/attrib) |
OFF | ON |
| Tradovate broker lock duration | 15 minutes | End of trading day (4 PM CST) |
PROD is the live preset. TEST is safer for verifying the script works on sim before relying on it.
If you genuinely need to recover (broker problem, real emergency — NOT tilt):
- Mac: double-click
Emergency Unblock.command— type password - Windows: double-click
Emergency Unblock.bat— UAC prompt
This removes hosts entries and the scheduled unblock task.
⚠ NOTE: Tradovate's broker-side Manual Lockout cannot be canceled by the trader once enabled. The Emergency Unblock only undoes the local hosts block; the broker side stays locked for its chosen duration (4 PM CST in PROD). This is intentional — the broker side is the real tilt-proof layer.
🟢 Tradeify confirmed (May 2026): This tool's monitoring + Manual Lockout pattern is permitted under their Funded Trader Agreement, as long as the script does NOT place trades or generate signals. This script doesn't.
⚠ For any other prop firm, broker, or platform: ASK FIRST. Different firms have different policies on third-party tools. A one-paragraph email to support before relying on this is the safe move.
Send something like: "I'm using a personal risk management script that monitors my Daily P&L on Tradovate, and when I hit a threshold (lower than my account's daily loss limit), it (a) clicks Tradovate's own Manual Lockout button to engage broker-side lockout, and (b) blocks tradovate.com locally on my machine. It does NOT place trades or generate signals. Is this permitted under my agreement?"
Save the reply as documentation.
Tradovate's EULA does not prohibit this kind of tool (verified May 2026), but their authorization is implicit, not explicit. Their official line publicly encourages third-party automation through authorized partners (TradingView, Jigsaw, TradersPost).
- Mobile app gap: Tradovate's Manual Lockout blocks trading across all platforms (per Tradeify's confirmation). However, after the broker lock expires (4 PM CST in PROD), Tradovate broker is technically unlocked. The hosts block keeps the website unreachable on this machine until 6 AM next day, but Tradovate's mobile app is not blocked by hosts. If this matters, set Screen Time on your phone to block Tradovate during cooling-off hours.
- Browser DNS-over-HTTPS: if your browser uses a custom DoH provider (Chrome's "Use Secure DNS" set to e.g.
1.1.1.1), it bypasses the hosts block. Use system DNS resolver setting. - iCloud Private Relay (Mac/Safari): must be disabled or Safari bypasses the block.
- Determined bypass: anyone with admin access can
chflags nouchg/attrib -Rand edit the hosts file back. The PRODchflags uchgadds friction but isn't unbreakable. The broker-side Manual Lockout is the strongest layer.
| File | Purpose |
|---|---|
tradovate_lockout.py |
Main script — cross-platform via platform.system() branching |
lockout_template.html |
Countdown timer page template |
Start Tradovate Lockout.command / .bat |
Launcher (sudo prompt / UAC self-elevate) |
Emergency Unblock.command / .bat |
One-click recovery |
Setup.command / .bat |
One-time install (venv + Playwright + Chromium) |
requirements.txt |
Python dependencies (just Playwright) |
MIT — see LICENSE.
Provided as-is. Use at your own risk. The author is not responsible for trading losses, prop firm violations, or any consequences of using this software.