SuperAPI AI Directory

btc-6h-scheduled

Data & analytics

View repository

Updated 10-15 21:34

About this skill

BTC 6-hour scheduled comprehensive analysis

Feature Overview

Runs both analysis sets automatically on the BTC 6h candlestick chart with a 6-hour cycle :

  1. Momentum Theory(btc-momentum-analyzer / THEORY.md): multi-timeframe segments, unit adjustment cycles, divergence, mechanical buy/sell points.
  2. Volume Contraction/Expansion / Energy Column Gaps(btc-volume-jump-analyzer / jump.pine): 6h volume-price scaling and pullback→gap entry signals.

And ensures MACD and candlestick data are precise: DIF/DEA/Histogram use IndicatorCalculator for precise calculation, EMA21/52 are recalculated from closing prices using the consistent EMA formula, and OHLCV is used as-is.

Each run outputs a timestamped comprehensive report: data/analysis_reports/<YYYY-MM-DD_HHMM>_6h_combined.md

Orchestration Script

# 更新数据库(网络可用时拉最新行情)并生成报告
python3 .claude/skills/btc-6h-scheduled/scripts/run_6h_analysis.py

# 跳过更新,直接用现有数据库(网络受限环境)
python3 .claude/skills/btc-6h-scheduled/scripts/run_6h_analysis.py --no-update

# 自定义参与级别(默认 1d,12h,6h,4h;6h 为主)
python3 .claude/skills/btc-6h-scheduled/scripts/run_6h_analysis.py --timeframes 1d,12h,6h,4h

Flow: ① Incrementally update database (automatic fallback on failure) → ② Read precise indicators → ③ Momentum mechanical buy/sell points → ④ Volume contraction/expansion/gaps → ⑤ Write comprehensive Markdown report.

How to run on a "every 6 hours" schedule

There are two ways; choose based on your runtime environment:

Method A: Operating system cron (unattended, purely mechanical reports)

Suitable for long-term operation on your own machine/server, producing precise data + mechanical signal snapshots.

crontab -e
# 每 6 小时整点运行(0/6/12/18 时):
0 */6 * * * /绝对路径/到/仓库/.claude/skills/btc-6h-scheduled/scripts/cron_6h.sh
  • Wrapper script cron_6h.sh automatically locates the repository root, updates the database, and generates the report.
  • Run log:data/analysis_reports/cron_6h.log
  • Manual test:bash .claude/skills/btc-6h-scheduled/scripts/cron_6h.sh

Method B: Claude scheduled polling (includes momentum theory "pattern reading" assessment)

In momentum theory, the parts that require "judging by reading MACD patterns" such as segment confirmation, divergence, and unit cycles are handled by Claude. If you want with Claude's assessment complete conclusions every 6 hours, use in a long-running Claude Code session /loop skill:

/loop 6h 用 btc-6h-scheduled 生成最新 6h 报告,然后结合 THEORY.md 给出动能研判与缩量放量结论

Claude will every 6 hours: run the orchestration script → read the report → apply THEORY.md to make segment/divergence/cycle judgments + volume contraction/expansion assessment → give a comprehensive conclusion.

Note:/loop takes effect during the session's lifetime; closing the session stops it. When you need 7×24 long-term unattended operation, use Method A, and have Claude read the latest report when assessment is needed.

Report Structure

  1. Multi-timeframe Segment Overview: precise DIF/DEA/Hist and segment direction for 1d/12h/6h/4h
  2. Momentum Theory Mechanical Buy/Sell Points: buy/sell/wait signals per THEORY.md rules
  3. Volume Contraction/Expansion / Energy Column Gaps (6h): volume-price state, gap positions and current candlestick signal, recent details
  4. Requires momentum theory assessment: a checklist left for Claude to use THEORY.md for in-depth judgment

Data and Network

  • Real-time data comes from OKX/Binance public APIs (database_manager.py --update)。
  • If the runtime environment's network policy blocks exchange APIs, updates will automatically fall back to the database's existing data, and the report will still be generated (corresponding to the last candlestick time in the database).
  • Database path:data/database/btc_database.json(can be overridden with environment variable MACD_DATA_DIR ).

Related Skills

  • btc-momentum-analyzer —— Kinetic Energy Theory and THEORY.md
  • btc-volume-jump-analyzer —— Shrinking Volume & Expanding Volume / jump.pine Logic

This Skill is for analytical reference only and does not constitute investment advice.