跳到正文
VibeFather
免费注册

关于这个模板

进入这个模拟交易工作区,你首先看到的是一张已经在运行的市场行情。自选列表追踪六家虚构公司,每家都有一条自己的价格走势线。选中某一行,它的K线、订单簿和交易委托单会一起成为焦点。深色画布让彩色K线实体有足够的呼吸空间。带符号的涨跌变化和对齐的数字,让你不依赖颜色也能读出价格移动的方向。

用时间周期切换来探索价格历史的不同部分,再查看单根K线,了解它的开盘价、最高价、最低价和收盘价。你可以在价格上叠加移动平均线和波动率带,或者在下方打开单独的动量图。图表下方,账户流水显示未平仓头寸如何随行情变动。投资组合视图包含现金,让你看到账户中实际投入了多少资金。

委托单与图表连接的是同一个合成市场。市价单按报价方向成交。挂单会显示可见的触发价、剩余购买力和取消操作。刷新页面后,账户、未完成指令和已保存的图表偏好都会恢复。教育工作者可以用它做交易练习,开发者可以用它来原型设计数据密集的产品,而无需开设券商账户。发行方范围、初始账户和交易台名称来自一个小型内容配置。一个适配器包含模拟行情源和执行规则,因此底层模型变化时界面可以保持不变。

模板提示词

在线演示就是用这份提示词原样做出来的,没有额外补充。 提示词保持英文原版,国内常用的 AI 编程工具都能直接理解;下面附中文参考译文。

# Stock Trading Dashboard

Build this website exactly as described below. Replace the [VARIABLES] with your own values; keep everything else.

## Brief
Build [BRAND], a working local paper-trading terminal. On first paint, [PRIMARY_ISSUER] ([PRIMARY_SYMBOL]) is active in a populated market and the account already holds three positions. Use the exact default variables unless values are supplied. Every panel reads from the same simulated market. Keep the exact notice “Simulated, not financial advice” in the workspace.

- Audience: Students experimenting with order types and developers building a desk around a local market feed.
- Goal: A visitor can inspect a price move, place and cancel orders, and see an account change as the feed advances.
- Tone: Economical US English desk labels, precise signed prices and plain feedback about what happened.

## Stack
- Framework: Vite + React + TypeScript
- Styling: Vanilla CSS
- Libraries: React and React DOM (MIT), Vite (MIT), TypeScript (Apache-2.0)
- Build: `npm run build` → static files in `dist/`. No backend, no server code, no external APIs.
- Setup:
  - Set Vite base to './' and production sourcemap to false. All graphics are local SVG or CSS.
  - Keep variable values and editorial copy in one content module. Put seeded data generation, feed ticks and simulated execution in one replaceable marketAdapter.ts file.
  - Persist a versioned account and feed snapshot with pending orders, fills, selected symbol and chart settings in localStorage. Seed only on first use and recover from malformed storage.

## Variables
- [BRAND] — Desk name (default: "Rivetline Desk")
- [PRIMARY_ISSUER] — Featured company (default: "Veylan Foundry")
- [PRIMARY_SYMBOL] — Featured synthetic ticker (default: "VYL.X7")
- [OPENING_CASH] — Starting cash in USD (default: "24500")
- [CREDIT] — keep a small "Template by VibeFather" link to https://vibefather.ai/t/stock-trading-dashboard in the footer (default: yes; delete this line to remove it)

The copy under Pages & Sections is written for the default values. If your values differ, rewrite every headline, paragraph, label and image for them — same length, tone and structure. Layout, colors, type and motion stay as described.
Keep all copy, image paths and links in one content file (for example `src/content.ts`), keyed by section, so the content can be swapped later without touching components.

Pro 模板

解锁完整提示词和源码

  • 完整提示词:设计、版块、动效、素材
  • 每个在线演示的源码
  • 商用授权

在线演示和 DESIGN.md 仍然免费。

$9/月起 · 年付和终身正在黑五特惠

DESIGN.md

单独的设计规范:配色、字体、间距和动效。可以把这套视觉用到你已有的项目上。

---
name: "Stock Trading Dashboard"
colors:
  near_black: "#0B0E14"
  up_green: "#16C784"
  down_red: "#EA3943"
  accent_blue: "#3B82F6"
  panel_graphite: "#111721"
  rule_steel: "#283444"
  ice_white: "#ECF2FA"
  muted_steel: "#A7B5C8"
typography:
  desk_headings_and_ui: { family: "Barlow", weights: [400, 500, 600, 700] }
  prices_and_symbols: { family: "IBM Plex Mono", weights: [400, 500, 600] }
spacing: "A 58px masthead, 24px desktop outer margins, 12px panel gaps, 16px panel padding, 36–46px data rows. At 1440px use a ~240px watchlist, flexible central chart and ~300px order desk. On narrow screens use one column, chart first and touch-friendly controls."
radius: "4px buttons and inputs, 7px framed panels, flat surfaces and fine steel seams."
---

# Stock Trading Dashboard — Design System

Apply this design system to an existing project. It describes the look and feel only; for the full site, use prompt.md.

## Colors
- **Near-black** `#0B0E14` — Terminal canvas and chart ground
- **Up green** `#16C784` — Rising candles, bids and signed gains
- **Down red** `#EA3943` — Falling candles, asks and loss marks; supplement with signs and lighter text when required for AA
- **Accent blue** `#3B82F6` — Selection rail, chart overlay and trade action with near-black text
- **Panel graphite** `#111721` — Panel fill and toolbar
- **Rule steel** `#283444` — Chart lattice and fine separators
- **Ice white** `#ECF2FA` — Primary and numerical text
- **Muted steel** `#A7B5C8` — Secondary labels

## Typography
- **Desk headings and UI** — Barlow (OFL), weights 400/500/600/700. Self-host the font files.
- **Prices and symbols** — IBM Plex Mono (OFL), weights 400/500/600. Self-host the font files.

## Spacing & shape
- Spacing: A 58px masthead, 24px desktop outer margins, 12px panel gaps, 16px panel padding, 36–46px data rows. At 1440px use a ~240px watchlist, flexible central chart and ~300px order desk. On narrow screens use one column, chart first and touch-friendly controls.
- Radius: 4px buttons and inputs, 7px framed panels, flat surfaces and fine steel seams.

## Motion
- Let trades arrive every two seconds from a seeded walk, briefly tinting only the changed price.
- Respect reduced motion by removing animated flashes and transitions while keeping data fresh.

## Imagery
Use a small original blue stepped-bar mark in the masthead, six original instrument glyphs formed from lines and polygons, crisp hand-drawn-in-code candle wicks, volume bars, miniature price traces and an allocation ring. Give the selected chart visual precedence. No photographs.

## Tone
Economical US English desk labels, precise signed prices and plain feedback about what happened.

---
— Prompt by VibeFather · https://vibefather.ai/t/stock-trading-dashboard · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown

改成你自己的

  • 金融教育工作者:将 BRAND 设为你的课程名称,OPENING_CASH 设为学生真实余额,并使用挂单流程教授触发和取消机制。
  • 原型设计交易台产品的开发者:保留默认市场适配器,将发行方范围替换为你自己的代码,并将账户流水连接到你的真实数据源。
  • 航运或海运股票交易台:将 PRIMARY_ISSUER 和 PRIMARY_SYMBOL 设为一家航运公司,重写自选列表名称,并保留深色终端风格。
  • 交易俱乐部或模拟联赛:将 BRAND 设为俱乐部名称,提高 OPENING_CASH 作为共享起始资金,并使用保存的图表偏好,让成员回到相同的视图。

股票交易仪表盘:常见问题

如何用这个模板为学生设置一个模拟交易练习?

股票交易仪表盘模板打开时就有一个模拟市场和一个已持有头寸的账户,学生可以立即开始查看价格走势。将 BRAND 设为你的课程或交易台名称,OPENING_CASH 设为你想要的起始余额,PRIMARY_ISSUER 和 PRIMARY_SYMBOL 设为你想要展示的公司和代码。然后学生就可以下市价单和挂单、取消订单,并随着行情推进观察流水和现金的变化。

怎么用 AI 做一个股票交易仪表盘?

复制本页的完整提示词(Pro),或者运行 npx vibefather add stock-trading-dashboard,把 [BRAND]、[OPENING_CASH]、[PRIMARY_ISSUER]、[PRIMARY_SYMBOL] 换成你自己的内容,再粘贴到 Claude Code、Codex、Cursor 等 AI 编程工具里。在线演示就是用这份提示词原样做出来的。