graph TB
START([⏰ Market Open 9:30]) --> STRAT
subgraph STRAT["🚀 Strategy Subprocess"]
SCHED[Strategy Scheduler] --> EXEC[Strategy Executor]
EXEC --> SCAN[Scanner Phase]
SCAN --> ENTRY[Entry Signal]
ENTRY --> CIRCUIT{Circuit Breaker}
CIRCUIT -->|OK| ORDER[Order Execution]
CIRCUIT -->|Halt| HALTED[Trading Halted]
end
ORDER --> |📤 Publish Event| NATS
subgraph NATS["📡 NATS JetStream Event Bus"]
direction LR
TRADING[trading.order_placed]
POSITION[trading.position_opened]
REGIME[dais.regime_detected]
STRATEGY[strategy.signal_generated]
end
NATS --> |📥 Subscribe| UNIFIED
subgraph UNIFIED["🔄 Unified Monitor"]
MON[Position & Exit Monitor] --> EXIT{Exit Signal?}
EXIT -->|Yes| CLOSE[Position Closed]
EXIT -->|No| CHECK[Continue Monitoring]
CHECK --> MON
end
CLOSE --> |📤 Publish| NATS
subgraph EODMGR["🌅 EOD Manager 3:15 PM+"]
MON -->|After 3:15| EOD[5-Phase Close]
EOD --> VERIFY[Verify Closed]
end
NATS --> |Replay & Forensics| VIZ([📊 Pipeline Visualizer])
CLOSE --> END([🏁 Day Complete])
HALTED --> END
VERIFY --> END
classDef startEnd fill:#e1f5ff,stroke:#01579b,stroke-width:3px
classDef scanner fill:#fff4e1,stroke:#e65100,stroke-width:2px
classDef entry fill:#f3e5f5,stroke:#6a1b9a,stroke-width:2px
classDef circuit fill:#fef3c7,stroke:#d97706,stroke-width:2px
classDef order fill:#e8f5e9,stroke:#1b5e20,stroke-width:2px
classDef monitor fill:#fce4ec,stroke:#880e4f,stroke-width:2px
classDef exit fill:#fff9c4,stroke:#f57f17,stroke-width:2px
classDef eod fill:#e0e7ff,stroke:#4338ca,stroke-width:2px
classDef halted fill:#fee2e2,stroke:#dc2626,stroke-width:2px
classDef nats fill:#dcfce7,stroke:#16a34a,stroke-width:3px
classDef viz fill:#dbeafe,stroke:#2563eb,stroke-width:2px
class START,END startEnd
class SCAN scanner
class ENTRY entry
class CIRCUIT circuit
class HALTED halted
class ORDER order
class MON,CHECK monitor
class EXIT,CLOSE exit
class EOD,VERIFY eod
class TRADING,POSITION,REGIME,STRATEGY nats
class VIZ viz
🔬 Trade Timeline
Select a trade to see its complete event history - every step from scan to close
📊
Select a trade from the dropdown above to view its complete event timeline
Order Placed
Order Filled
Position Opened
Position Closed
Regime Change
Other
⏯️ Day Replay
Scrub through actual events and watch your trading day unfold
Speed:
Click "Load Day" to load events, then press Play to watch your trading day unfold
📡 Real-Time Monitoring Components
🔄 Unified Monitor
Script: unified_monitor.py
Status: Active
Centralized position monitoring, exit signals & order sync
- Every 2 min: check_positions()
- Every 3 min: sync_order_status()
- Every 3 min: check_exit_signals()
🤖 Order Manager
Script: order_manager.py
Status: Active
Manages bracket orders (Entry + TP + SL)
🌅 EOD Manager
Script: eod_manager_universal.py
Status: Standby
5-phase position closing (3:15 PM - 4:00 PM)
- 3:15 PM: Prep Phase
- 3:30 PM: Early Close
- 3:45 PM: Accelerated
- 3:55 PM: Emergency
🐕 Strategy Watchdog
Interval: Every 5 minutes
Status: Healthy
Health checks & subprocess recovery
📈 Filter Effectiveness Analysis
Win Rate
--
Based on logged entries
Winner Characteristics
Price: --
Gap: --
RVOL: --
Loser Characteristics
Price: --
Gap: --
RVOL: --
Pipeline Health
--
Strategies Logging: --
Decisions Today: --
💡 Filter Insights
Analyzing filter patterns...
🔄 Subprocess Architecture
flowchart TB
subgraph FASTAPI["🖥️ FastAPI App (main.py)"]
MAIN[Lifespan Manager]
SCHED[APScheduler]
end
subgraph STRATEGIES["🚀 Strategy Subprocesses (Entry Only)"]
SE1[Strategy 1]
SE2[Strategy 2]
SE3[Strategy N]
end
subgraph NATS["📡 NATS JetStream"]
direction TB
STREAM1[trading stream]
STREAM2[dais stream]
STREAM3[strategy stream]
end
subgraph MONITORS["🔄 Monitoring Services"]
UM[unified_monitor.py]
OM[order_manager.py]
EOD[eod_manager_universal.py]
WD[Watchdog]
end
subgraph BROKERS["📡 Broker Abstraction"]
BRKR[Broker Manager]
IBKR[IBKR Broker]
ALP[Alpaca Broker]
end
subgraph VIZ["📊 Pipeline Visualizer"]
REPLAY[Event Replay]
TIMELINE[Trade Timeline]
end
MAIN --> SCHED
SCHED --> SE1
SCHED --> SE2
SCHED --> SE3
SCHED --> UM
SCHED --> WD
SE1 -.->|publish| NATS
SE2 -.->|publish| NATS
SE3 -.->|publish| NATS
UM -.->|publish| NATS
OM -.->|publish| NATS
NATS -.->|subscribe| UM
NATS -.->|replay| VIZ
SE1 --> OM
SE2 --> OM
SE3 --> OM
UM --> BRKR
OM --> BRKR
EOD --> BRKR
SE1 --> BRKR
SE2 --> BRKR
SE3 --> BRKR
BRKR --> IBKR
BRKR --> ALP
style MAIN fill:#e1f5ff,stroke:#01579b,stroke-width:2px
style SCHED fill:#e0f2fe,stroke:#0369a1,stroke-width:2px
style SE1 fill:#f3e5f5,stroke:#6a1b9a,stroke-width:2px
style SE2 fill:#f3e5f5,stroke:#6a1b9a,stroke-width:2px
style SE3 fill:#f3e5f5,stroke:#6a1b9a,stroke-width:2px
style UM fill:#fce4ec,stroke:#880e4f,stroke-width:2px
style OM fill:#e8f5e9,stroke:#1b5e20,stroke-width:2px
style EOD fill:#e0e7ff,stroke:#4338ca,stroke-width:2px
style WD fill:#e8f5e9,stroke:#1b5e20,stroke-width:2px
style BRKR fill:#fff4e1,stroke:#e65100,stroke-width:2px
style IBKR fill:#fff4e1,stroke:#e65100,stroke-width:2px
style ALP fill:#fff4e1,stroke:#e65100,stroke-width:2px
style STREAM1 fill:#dcfce7,stroke:#16a34a,stroke-width:2px
style STREAM2 fill:#dcfce7,stroke:#16a34a,stroke-width:2px
style STREAM3 fill:#dcfce7,stroke:#16a34a,stroke-width:2px
style REPLAY fill:#dbeafe,stroke:#2563eb,stroke-width:2px
style TIMELINE fill:#dbeafe,stroke:#2563eb,stroke-width:2px
⚠️ Deprecated Scripts (Do NOT Use)
These IBKR-only scripts are replaced by universal versions:
position_monitor.py → Use unified_monitor.py
exit_monitor.py → Use unified_monitor.py
order_status_sync.py → Use unified_monitor.py
eod_manager.py → Use eod_manager_universal.py
🔴 Live Scanner Candidates
Real-time stream of scored candidates from active strategies
Disconnected
Candidates Today:
0
Avg Score:
--
| Time |
Symbol |
Score |
Rank |
Price |
Gap % |
RVOL |
Strategy |
|
Click "Connect" to start receiving live candidates
|
📡 Event Log
Real-time stream of trading and system events from NATS JetStream
Events Loaded:
0
Trading:
0
DAIS:
0
Auto-refresh:
| Time |
Event Type |
Symbol |
Details |
|
Loading events...
|