This directory contains documentation for the integrated features of OptionsCommander (formerly RH2MAS). Documents are sequenced like a manual for easy learning.
-
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
-
3. GTC Scheduler - Technical Details (Issue #287)
- Deep dive into architecture and design
- API efficiency (90% cost savings)
- Retry logic and error handling
- For developers and advanced users
-
- Test record from 2025-01-10 (19/19 passed then)
- Integration verification
- Performance metrics
-
5. Interactive CLI Test Plan (Issue #334)
- Live testing guide with real user prompts
- 25+ test cases based on manual testing
- Known issues from #334 documented
- Bug fixes and improvements needed
- Use this for live validation testing
-
6. CLI Order Display (Issue #371)
- Grouped, hierarchical display of open orders (proposed)
-
- Commands of the
/schedulemode: status, history, enable/disable, test runs
- Commands of the
-
8. Timeframe Specification (Issue #365)
- Multi-timeframe configuration and CLI tools
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
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:
- Quick Start: 02_gtc_scheduler_quickstart.md
- Technical: 03_gtc_scheduler_technical.md
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_typebefore 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 statusDocumentation:
- Architecture: 08_llm_routing_architecture.md
- Test Plan: 05_interactive_cli_test_plan.md (Category 7)
- Main README: See main README.md
- Read in order: Start with #1 (Position Alerts) and progress sequentially
- Try examples: Each doc has copy-paste examples
- Refer back: Use as reference when questions arise
- Jump to specific features
- Read technical docs (#3) for architecture
- Use testing doc (#4) for verification
- Technical details in #3 (Scheduler architecture)
- Test suite in #4 (All test cases)
- ADRs in docs/05_decisions/
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:
- Cron runs
main.py --run-due; at 9:20 AM ET the morning routine is due - Fetches broker state (positions, orders, account) and records the day
- Reconciles, and re-places missing or expiring stops
- Checks position alerts and GTT triggers
- Raises stops to their trailing level
- Saves state with alert history
- 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- 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
- #306 - Position Alerts System
- #287 - GTC Daily Execution
- #328 - YAML Prompt Management
- #339 - Unified Interactive CLI
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
- Scheduler steps, cron deployment and trailing-stop levels updated (#596)
- Index covers docs 06-08
- Initial unified feature release
- Position alerts (#306)
- GTC scheduler (#287)
- Unified CLI (#339)
- All docs organized and sequenced