Skip to content

Latest commit

 

History

History
281 lines (193 loc) · 7.72 KB

README.md

File metadata and controls

281 lines (193 loc) · 7.72 KB

Feature Documentation - User Manual

This directory contains documentation for the integrated features of OptionsCommander (formerly RH2MAS). Documents are sequenced like a manual for easy learning.

📚 Quick Navigation

Getting Started

  • 1. Position Alerts System (Issue #306)

    • What it does: Monitor positions and generate alerts
    • 5 alert types with cooldown and persistence
    • Integrated into trading cycle and CLI
    • Start here to understand position monitoring
  • 2. GTC Scheduler - Quick Start (Issue #287)

    • 5-minute setup wizard for daily automation
    • Deployment: cron (recommended), systemd or a daemon
    • For users who want to "set it and forget it"
    • Read this to get scheduler running quickly

Advanced/Technical


Feature Summary

Position Alerts System (#306)

What: Real-time monitoring of open positions with smart alerts

Why: Know when positions approach targets/stops without constant checking

Key Features:

  • 5 alert types (approaching TP/SL, stop adjusted, targets reached)
  • 5-minute cooldown (anti-spam)
  • Alert history persists across restarts
  • Integrated into unified CLI

Usage:

python main.py

> check my alerts
📊 Checking Position Alerts...
🔔 2 Alert(s) Generated:
   ⚠️  TQQQ approaching take profit!

Documentation: 01_position_alerts_system.md


GTC Daily Scheduler (#287)

What: "Set it and forget it" twice-daily trading automation

Why: Automate morning reconciliation and evening review without manual intervention

Key Features:

  • Twice-daily execution (9:20 AM, 3:50 PM ET), NYSE trading days only
  • Raises stops to their trailing level, re-places missing or expiring stops
  • Retry logic with exponential backoff
  • Runs from cron every 5 minutes (recommended), or as a daemon

Usage:

# Recommended: cron entry that runs whatever is due
./scripts/deployment/setup_cron.sh    # adds */5 * * * * ... main.py --run-due

# Alternative: background daemon
python main.py --daemon

# Or check status via CLI
python main.py

> show scheduler status
🤖 Daily Scheduler Status...
   Morning routine: 09:20:00 ET ✅
   Evening routine: 15:50:00 ET (pending)

Documentation:


Unified Interactive CLI (#339)

What: Single interactive interface for all features with LLM-based intelligent routing

Why: Eliminate fragmented commands, enable natural language interaction

Key Features:

  • LLM-Based Routing: Context-aware classification (trade vs status query)
  • Natural Language: "check my alerts", "show portfolio", "any open orders?"
  • No Hardcoded Patterns: Handles ambiguous tickers (ANY, WHAT, etc.) automatically
  • All Features in One Session: Zero friction, just python main.py
  • Mode Indicator: Visual prompt shows CONFIRM/AUTO mode like conda environments

Architecture:

  • LLM parser determines request_type before ticker extraction
  • Prevents "any open orders?" from being parsed as ticker "ANY"
  • Fast keyword routing for scheduler/alerts (no LLM overhead)
  • Scalable: No special cases needed for individual tickers

Usage:

python main.py    # Just works!

(✋ CONFIRM) > buy 10 AAPL           # Execute trade
(✋ CONFIRM) > check my alerts       # Position alerts
(✋ CONFIRM) > any open orders?      # Shows orders (NOT ticker "ANY")
(✋ CONFIRM) > show scheduler status # Scheduler management
(✋ CONFIRM) > /toggle               # Switch to AUTO mode
(🤖 AUTO) > show portfolio           # Account status

Documentation:


How to Use This Manual

For New Users

  1. Read in order: Start with #1 (Position Alerts) and progress sequentially
  2. Try examples: Each doc has copy-paste examples
  3. Refer back: Use as reference when questions arise

For Advanced Users

  • Jump to specific features
  • Read technical docs (#3) for architecture
  • Use testing doc (#4) for verification

For Developers

  • Technical details in #3 (Scheduler architecture)
  • Test suite in #4 (All test cases)
  • ADRs in docs/05_decisions/

Feature Integration

All features work together seamlessly:

Unified CLI (#339)
    ├── Position Alerts (#306)
    │   ├── Alert checking
    │   └── Alert history
    ├── GTC Scheduler (#287)
    │   ├── Status display
    │   └── Execution history
    └── Portfolio Monitoring
        ├── Account status
        └── Position P/L

Morning Routine Flow:

  1. Cron runs main.py --run-due; at 9:20 AM ET the morning routine is due
  2. Fetches broker state (positions, orders, account) and records the day
  3. Reconciles, and re-places missing or expiring stops
  4. Checks position alerts and GTT triggers
  5. Raises stops to their trailing level
  6. Saves state with alert history
  7. Writes reports/daily/<ET date>_morning.md

The evening routine (3:50 PM ET) runs the same steps; it raises stops only while the market is open.

User Interaction:

python main.py

> check my alerts
# Shows results from morning run

> show scheduler status
# Confirms morning routine completed

Related Documentation

Core System Docs

  • Main README: /README.md - System overview and quick start
  • Development: /docs/04_development/ - Project status and structure
  • Architecture: /docs/02_architecture/ - System design
  • ADRs: /docs/05_decisions/ - Architecture decisions

Issues

  • #306 - Position Alerts System
  • #287 - GTC Daily Execution
  • #328 - YAML Prompt Management
  • #339 - Unified Interactive CLI

Support

Questions?

  • Check this manual first
  • See main README.md
  • Review test results (#4)
  • Check GitHub issues

Found a bug?

  • Create GitHub issue
  • Include steps to reproduce
  • Attach relevant logs

Need a feature?

  • Create GitHub issue with "enhancement" label
  • Describe use case
  • Explain benefit

Version History

v1.1 - 2026-10-20

  • Scheduler steps, cron deployment and trailing-stop levels updated (#596)
  • Index covers docs 06-08

v1.0 - 2025-01-10

  • Initial unified feature release
  • Position alerts (#306)
  • GTC scheduler (#287)
  • Unified CLI (#339)
  • All docs organized and sequenced