OPS Live Trading Operations
The daily reality of running a live trading system
Learning Objectives
- •Understand the operational aspects of live trading
- •Learn pre-market and post-market routines
- •Handle common live trading scenarios
Explain Like I'm 5
Running a live trading system is like being a pilot. Most of the time, autopilot handles it. But you need to monitor, do pre-flight checks, handle emergencies, and keep a log of everything. The system trades for you, but you're responsible for making sure it's working correctly.
Think of It This Way
Live trading operations is like running a restaurant kitchen. The recipe (strategy) is set. The ingredients (data) come in daily. Your job is to make sure the kitchen runs smoothly: ingredients are fresh (data quality), equipment works (system health), and the food goes out on time (trades execute).
1Daily Operations Routine
2Common Scenarios
Hands-On Code
Daily Operations Checklist
from datetime import datetime
class DailyChecklist:
"""Automated daily operations checklist."""
def __init__(self, engine, connector):
self.engine = engine
self.connector = connector
def pre_session_check(self):
"""Run before trading session."""
checks = {}
# 1. Connection
checks['connection'] = self.connector.is_connected()
# 2. Account balance
account = self.connector.get_account_info()
checks['balance_ok'] = account.balance > 0
checks['margin_level'] = account.margin_level
# 3. All positions have SL/TP
positions = self.connector.get_positions()
checks['all_sl_set'] = all(p.sl > 0 for p in positions)
checks['all_tp_set'] = all(p.tp > 0 for p in positions)
# 4. Risk state
dd_pct = (account.starting_balance - account.equity) / account.starting_balance * 100
checks['dd_zone'] = 'NORMAL' if dd_pct < 4 else 'CAUTION' if dd_pct < 6 else 'DANGER'
# 5. Model loaded
checks['models_loaded'] = self.engine.models_loaded
# Report
print(f"=== PRE-SESSION CHECK ({datetime.now():%Y-%m-%d %H:%M}) ===")
all_ok = True
for check, value in checks.items():
status = "[PASS]" if value not in [False, 'DANGER', 'CRITICAL'] else "[FAIL]"
if value == 'CAUTION':
status = "[WARN]"
print(f" {status} {check}: {value}")
if status == "[FAIL]":
all_ok = False
print(f"\n{'[PASS] CLEARED FOR TRADING' if all_ok else '[FAIL] ISSUES DETECTED — RESOLVE BEFORE TRADING'}")
return all_okAutomate your pre-session checks. Never start trading without verifying: connection, balance, SL/TP on positions, risk state, and model health. An automated checklist eliminates the possibility of forgetting a critical step.
Knowledge Check
Q1.You've had 6 consecutive losing trades. The system is functioning correctly. What should you do?
Assignment
Create a daily operations checklist (automated) that verifies: connection, balance, SL/TP coverage, risk state, model health, and recent performance. Run it against your system.