Chart Master
This skill generates professional-grade financial charts using Python (mplfinance / yfinance).
Usage
Run the bundled script to generate a chart. The script fetches data automatically.
Command
CODEBLOCK0
Parameters
- *
--ticker: The symbol to chart (e.g., AAPL, BTC-USD, ^NDX, ^GSPC). - INLINECODE7 : Data range (e.g.,
1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, max, ytd). - INLINECODE18 : Bar size (e.g.,
1m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3mo).
Note:* Intraday data (
1m-
60m) is only available for the last 60 days.
- *
--type: Chart type (default: candle; options: candle, line, renko, pnf). - INLINECODE39 : Visual style (default:
yahoo; options: binance, blueskies, charles, checkers, classic, default, mike, nightclouds, sas, starsandstripes, yahoo). - INLINECODE52 : Moving averages (comma-separated, e.g.,
20,50,200). - INLINECODE54 : specific flag
--volume to show volume pane (default: true).
Output
The script saves a PNG file to the current working directory and prints the filename.
Action: Use the read tool (or write if editing) to handle the file, but primarily display the image to the user using the appropriate tool if available, or simply confirm the file was created and provide the path.
图表大师
本技能使用Python(mplfinance / yfinance)生成专业级金融图表。
使用方法
运行捆绑脚本即可生成图表。脚本会自动获取数据。
命令
bash
uv run --with yfinance --with mplfinance --with pandas {baseDir}/scripts/generate_chart.py --ticker NVDA --period 6mo --interval 1d --style yahoo --title NVIDIA日线图
参数
- * --ticker:要绘制图表的标的代码(例如:AAPL、BTC-USD、^NDX、^GSPC)。
- --period:数据范围(例如:1d、5d、1mo、3mo、6mo、1y、2y、5y、max、ytd)。
- --interval:K线周期(例如:1m、5m、15m、30m、60m、90m、1h、1d、5d、1wk、1mo、3mo)。
注意:* 日内数据(1m-60m)仅适用于最近60天。
- * --type:图表类型(默认:candle;可选:candle、line、renko、pnf)。
- --style:视觉风格(默认:yahoo;可选:binance、blueskies、charles、checkers、classic、default、mike、nightclouds、sas、starsandstripes、yahoo)。
- --mav:移动平均线(逗号分隔,例如:20,50,200)。
- --volume:使用--volume标志显示成交量面板(默认:true)。
输出
脚本会将PNG文件保存到当前工作目录,并打印文件名。
操作: 使用read工具(或编辑时使用write)处理文件,但主要应使用适当的工具向用户展示图片(如果可用),或仅确认文件已创建并提供路径。