
stock-monitor
A full-featured intelligent stock monitoring and alert system. Supports 7 major alert rules including cost percentage, moving average golden cross/death cross, RSI overbought/oversold, volume anomalies, gap openings, and dynamic profit-taking. Matches Chinese investor habits (red for up, green for down).
46stars
7forks
Updated 2/3/2026
SKILL.md
read-only
name
stock-monitor
description
A full-featured intelligent stock monitoring and alert system. Supports 7 major alert rules including cost percentage, moving average golden cross/death cross, RSI overbought/oversold, volume anomalies, gap openings, and dynamic profit-taking. Matches Chinese investor habits (red for up, green for down).
Stock Monitor Pro - Full-Featured Intelligent Investment Advisory System
π― Core Features
1. Seven Alert Rules (All Included!)
| Rule | Trigger Condition | Weight |
|---|---|---|
| Cost Percentage | Profit +15% / Loss -12% | βββ |
| Intraday Change | Individual Β±4% / ETF Β±2% / Gold Β±2.5% | ββ |
| Volume Anomaly | Volume >2x average / Volume <0.5x average | ββ |
| MA Golden/Death Cross | MA5 crosses above/below MA10 | βββ |
| RSI Overbought/Oversold | RSI>70 overbought / RSI<30 oversold | ββ |
| Gap Opening | Upward/downward gap >1% | ββ |
| Dynamic Profit-Taking | After 10% profit, pullback 5%/10% | βββ |
2. Tiered Alert System
- π¨ Emergency: Multiple conditions coincide (e.g., volume surge + MA golden cross + breakout above cost)
- β οΈ Warning: 2 conditions triggered (e.g., RSI oversold + volume surge)
- π’ Reminder: Single condition triggered
3. Chinese Habits
- π΄ Red = Up / Profit
- π’ Green = Down / Loss
π Monitoring Configuration
Complete Alert Rule Example
{
"code": "600362",
"name": "Jiangxi Copper",
"type": "individual", # Individual stock
"market": "sh",
"cost": 57.00, # Holding cost
"alerts": {
# 1. Cost percentage
"cost_pct_above": 15.0, # Alert at 15% profit (Β₯65.55)
"cost_pct_below": -12.0, # Alert at 12% loss (Β₯50.16)
# 2. Intraday change (individual Β±4%)
"change_pct_above": 4.0,
"change_pct_below": -4.0,
# 3. Volume anomaly
"volume_surge": 2.0, # Volume >2x 5-day average
# 4-7. Technical indicators (enabled by default)
"ma_monitor": True, # MA golden/death cross
"rsi_monitor": True, # RSI overbought/oversold
"gap_monitor": True, # Gap opening
"trailing_stop": True # Dynamic profit-taking
}
}
Differentiated Thresholds by Asset Type
| Type | Intraday Change Threshold | Volume Threshold | Applicable Assets |
|---|---|---|---|
| individual (Individual stock) | Β±4% | 2x | Jiangxi Copper, Ping An of China |
| etf (ETF) | Β±2% | 1.8x | Hang Seng Healthcare, ChiNext 50, etc. |
| gold (Gold) | Β±2.5% | None | London Gold |
π How to Run
Background Daemon Process
cd ~/workspace/skills/stock-monitor/scripts
./control.sh start # Start
./control.sh status # Check status
./control.sh log # View logs
./control.sh stop # Stop
β‘ Smart Frequency (Beijing Time)
| Time Period | Frequency | Monitored Assets |
|---|---|---|
| Trading hours 9:30-15:00 | Every 5 minutes | All + technical indicators |
| Lunch break 11:30-13:00 | Every 10 minutes | All |
| After close 15:00-24:00 | Every 30 minutes | All (daily data) |
| Early morning 0:00-9:30 | Every 1 hour | London Gold only |
| Weekend | Every 1 hour | London Gold only |
π Alert Message Examples
Multiple Conditions Coincide (Emergency)
π¨γEmergencyγπ΄ Jiangxi Copper (600362)
ββββββββββββββββββββ
π° Current Price: Β₯65.50 (+15.0%)
π Holding Cost: Β₯57.00 | P/L: π΄+14.9%
π― Alerts Triggered (3 items):
β’ π― Profit 15% (Target price Β₯65.55)
β’ π MA Golden Cross (MA5Β₯63.2 crosses above MA10Β₯62.8)
β’ π Volume Surge 2.5x (5-day average)
π Jiangxi Copper In-Depth Analysis
π° Price Movement:
β’ Current: 65.5 (+15.0%)
β’ MA Trend: MA5>MA10>MA20 [Bullish alignment]
β’ RSI: 68 [Approaching overbought]
π‘ Kimi's Suggestion:
π Multiple conditions coincide, strong trend, consider holding or gradually reducing position.
RSI Oversold (Warning)
β οΈγWarningγπ’ Hang Seng Healthcare (159892)
ββββββββββββββββββββ
π° Current Price: Β₯0.72 (-10.0%)
π Holding Cost: Β₯0.80 | P/L: π’-10.0%
π― Alerts Triggered (2 items):
β’ π Intraday drop -10.0%
β’ βοΈ RSI oversold (28.5), possible rebound
π‘ Kimi's Suggestion:
π Short-term oversold severely, RSI in oversold zone, watch for rebound opportunities but don't rush to buy the dip.
Dynamic Profit-Taking Reminder
π’γReminderγπ΄ Ping An of China (601318)
ββββββββββββββββββββ
π° Current Price: Β₯70.50 (+6.8%)
π Holding Cost: Β₯66.00 | P/L: π΄+6.8%
π― Alert Triggered:
β’ π Profit pullback 5.2%, suggest reducing position to protect profits
(Max profit 12% has pulled back)
π οΈ File Structure
stock-monitor/
βββ SKILL.md # This document
βββ RULE_REVIEW_REPORT.md # Rule review report
βββ scripts/
βββ monitor.py # Core monitoring (7 rules)
βββ monitor_daemon.py # Background daemon process
βββ analyser.py # Intelligent analysis engine
βββ control.sh # One-click control script
βοΈ Custom Configuration
Modify Cost Price
"cost": 55.50, # Change to your actual cost
Adjust Alert Thresholds
"cost_pct_above": 20.0, # Alert at 20% profit
"cost_pct_below": -15.0, # Alert at 15% loss
"change_pct_above": 5.0, # Intraday change Β±5%
"volume_surge": 3.0, # Alert at 3x volume
Toggle Technical Indicators
"ma_monitor": False, # Disable MA
"rsi_monitor": True, # Enable RSI
"gap_monitor": True, # Enable gap
π Changelog
- v3.0 Full-featured version: Completed 7 alert rules (cost/change/volume/MA/RSI/gap/dynamic profit-taking)
- v2.4 Cost percentage version: Support percentage alerts based on holding cost
- v2.3 China version: Red up, green down color convention
- v2.2 Daemon version: Background daemon process support
- v2.1 Smart frequency version: Smart frequency control
- v2.0 Pro version: News sentiment analysis
β οΈ Usage Tips
- Technical indicators lag: MA, MACD, etc. are lagging indicators, used to confirm trends rather than predict
- Avoid overtrading: Alerts are for reference, don't act on every signal
- Multiple conditions are more reliable: Single indicators can produce false signals; multiple conditions are more accurate
- Dynamic profit-taking should be flexible: 5% pullback to reduce position, 10% to clear is a suggestion; adjust flexibly based on market conditions
Core Principle:
The goal of the alert system is to "not miss big opportunities, not make big mistakes," not to "catch every fluctuation."





