Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ The current Windows dependency baseline also includes `regex` 1.13.1, `regex-aut
- TradeCraft began as a single binary crate, with market data coupled to `egui-charts` and live candle logic in the UI. The workspace now has separate crates and a UI-independent engine. Existing Git history is preserved; the initial commit was made after the initial code already existed and cannot be changed without rewriting history.
- The upstream egui-charts terminal owns the live GUI's chart, indicator and layout state. The existing engine remains UI-independent and supports the isolated `--commands` and `--script <path>` interface; those commands do not control the terminal window. The terminal feed adapter is in the UI crate and calls the provider and engine layers. A comprehensive command registry covering every UI action and an MCP server are not implemented.
- The egui-charts source is vendored at `vendor/egui-charts`. Its upstream revision is recorded in `vendor/EGUI-CHARTS-UPSTREAM`; local modifications include host integration, data services and session controls. The scheduled GitHub workflow compares that revision with upstream `main` and opens or updates an issue when they differ. It also opens one tracking issue per newly observed stable upstream release. It does not merge changes automatically. Review the full vendored diff and validate personal Windows, community Windows and macOS builds when updating the dependency; retain its upstream license files, font and icon notices.
- The November 14 upstream integration advances egui-charts from `c9a7f0bbe6410eb6bc69fd2f2e8a6394919ac4f2` to `7a852a5152f9a5c3f3cc556f70170094e976d823`, preserving TradeCraft's Pine table colours, chart panning, provider integration and terminal customizations. Three upstream tests are adapted to TradeCraft's deliberate behavior: keep the user's near-live offset and hide custom intervals when the feed only supports presets. The terminal adds a direct dependency on `png` 0.17.16, already present in the locked application graph. Both macOS architectures passed automated builds and provider/UI tests for candidate commit `eae3a82`; interactive validation remains outstanding.
- The terminal's file storage saves named documents using encoded names and a temporary-file rename. Saved layout and drawing restoration, crash recovery, and multi-process conflicts need further verification. Alert definitions and statuses are saved locally; evaluation operates only while the app runs. Tradier charts and watchlists share one dynamically updated market stream; initial quotes use REST snapshots. Yahoo watchlist quotes use delayed REST data. Symbol search combines the selected provider with Kraken crypto pairs. The experimental Pine editor uses an adapted interpreter from DimmOFF's egui-charts fork; its subset and output require further compatibility, resource and live-data verification.
- The chart-tab strip saves open chart workspaces in terminal settings and restores them on startup or after changing providers. Switching tabs pauses inactive chart feeds while the watchlist uses the shared Tradier stream. Experimental Pine studies embed their applied source in the snapshot; the last complete snapshot is retained when an unregistered study cannot be serialized. Named layouts remain separate. File storage uses OS file locks and revision checks for settings and drawing conflicts. Workspace restart coverage uses an in-memory store; full process-crash recovery and cross-process behavior still need end-to-end verification.
- On a Tradier stream reconnect, chart recovery requests the missing historical range, restores completed bars, then reconciles the forming candle using complete one-minute bars and buffered later ticks. The chart reports recovery or errors; Tradier's intraday retention limits apply. Initial-load history overlap, provider corrections and late trade reconciliation remain open, and recovery under real market-hour interruptions needs further verification.
Expand Down
6 changes: 5 additions & 1 deletion ATTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

TradeCraft includes a modified copy of [egui-charts](https://github.com/userFRM/egui-charts), including its terminal. Its upstream license texts and third-party notices are in [vendor/egui-charts](vendor/egui-charts/). The upstream terminal manifest has no license field; TradeCraft adds one based on the upstream repository's license statement at the recorded revision, which does not specifically single out the terminal.

The experimental Pine interpreter is adapted from [DimmOFF's egui-charts fork](https://github.com/DimmOFF/egui-charts/tree/229207f089a8dd7ee89373dce1c9bc96309da7d4/examples/demo/pine_engine). The fork's [MIT license at that revision](https://github.com/DimmOFF/egui-charts/blob/229207f089a8dd7ee89373dce1c9bc96309da7d4/LICENSE-MIT) has the same copyright and terms as the vendored egui-charts MIT license. TradeCraft modifies its study adapter, diagnostics and execution safeguards.
The experimental Pine interpreter is adapted from [DimmOFF's egui-charts fork](https://github.com/DimmOFF/egui-charts/tree/229207f089a8dd7ee89373dce1c9bc96309da7d4/examples/demo/pine_engine). The initial import used revision [13bf91a2](https://github.com/DimmOFF/egui-charts/commit/13bf91a2ea55d4b46c8de1dc1291a35d4fc6dd78); a later three-way merge incorporated changes from [229207f0](https://github.com/DimmOFF/egui-charts/commit/229207f089a8dd7ee89373dce1c9bc96309da7d4). TradeCraft retained its own `mod.rs` and resolved conflicts and made further modifications, including to the study adapter, diagnostics and execution safeguards. The chart's `vendor/egui-charts/src/studies/table.rs` also incorporates code copied and adapted from the fork. The fork's [MIT license at the later revision](https://github.com/DimmOFF/egui-charts/blob/229207f089a8dd7ee89373dce1c9bc96309da7d4/LICENSE-MIT) has the same copyright and terms as the vendored egui-charts MIT license.

The [BB-levels sample](scripts/pine/bb-levels.pine) adapts a script provided by its original author, who confirmed authorship and authorized MIT licensing on November 14, 2026. The sample and TradeCraft's modifications are available under the project's [MIT license](LICENSE).

After the initial import and merge, TradeCraft selectively incorporated further Pine changes through DimmOFF revision [`e7e1e98b`](https://github.com/DimmOFF/egui-charts/commit/e7e1e98b722e59fc40e30b62bca83f5dbe47989c). The reviewed boundary and adopted changes are recorded in [the Pine upstream review](docs/DIMMOFF-PINE-UPSTREAM.md); the boundary does not mean every upstream change was adopted.

TradeCraft uses the default fonts embedded by [epaint_default_fonts 0.37.0](https://crates.io/crates/epaint_default_fonts/0.37.0) through egui's `default_fonts` feature. No font binaries are maintained in this repository.

Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Unreleased

## 0.4.0 — alpha

- Add a read-only Tradier options chain with expiration selection, calls and puts, configurable columns, quotes and available Greeks; open a contract in a chart tab.
- Improve Pine indicator support, including lower-timeframe requests, session flags and historical prior-day values. Compatibility and live behavior still need verification.
- Update the vendored egui-charts main branch to `7a852a5`, including upstream chart and study improvements, while retaining TradeCraft's provider, Pine and chart interaction changes. Both macOS architectures passed automated builds; interactive validation remains pending.

## 0.3.0 — alpha

- Add multiple chart tabs and restore saved workspaces, including applied Pine studies, when restarting or changing providers.
Expand Down
13 changes: 7 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resolver = "3"
exclude = ["vendor/egui-charts", "vendor/egui-charts/terminal"]

[workspace.package]
version = "0.3.0"
version = "0.4.0"
edition = "2024"
license = "MIT"

Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TradeCraft alpha

TradeCraft remains in alpha until announced otherwise. Versions use `0.minor.patch`: the minor number advances for feature milestones and the patch number for fixes and small improvements. This release is `0.3.0`. The workspace version in `Cargo.toml` is the source of truth; release tags and packages use the same version, such as `v0.3.0`. A version number is not reused for a different release.
TradeCraft remains in alpha until announced otherwise. Versions use `0.minor.patch`: the minor number advances for feature milestones and the patch number for fixes and small improvements. The workspace version is `0.4.0`, in preparation for the next release. The workspace version in `Cargo.toml` is the source of truth; release tags and packages use the same version. A version number is not reused for a different release.

A native Rust charting experiment using the egui/eframe stack and the development version of egui-charts. It loads one-, five-, fifteen-minute or daily chart history from Yahoo, Tradier, or Kraken for supported crypto pairs; Tradier streams market price updates for charts and the watchlist over one shared connection. It does not request account information, positions, or order history. Chart and price timestamps use the computer's local time in 12-hour format.

Expand All @@ -16,9 +16,13 @@ On quit, TradeCraft waits for pending saves. If saving fails or takes longer tha

The watchlist shows provider quotes and changes, and symbol search supports company names and tickers. Tradier watchlist prices update from the shared stream; an initial batched quote request supplies the previous close. Yahoo quotes are based on completed candles delayed by at least 15 minutes and refresh approximately once a minute. Kraken's supported crypto spot pairs are available in symbol search and use its public live ticker and candle streams. Crypto watchlist changes are rolling 24-hour changes. BTCUSD remains an alias for Kraken's BTC/USD. Kraken's spot history returns at most 720 recent candles, including the current candle. Provider availability and entitlements apply.

With Tradier selected, use Options in the chart toolbar or right-click a watchlist symbol and choose View options to inspect its chain. Select an expiration and a contract to open a chart tab. The chain is a manually refreshed snapshot; its receipt time is not the timestamp of every quote, and Tradier's Greeks may update less frequently. Coverage, delays, and option-chart history depend on Tradier and the account's entitlements. Expired options history is not available from Tradier.

## Run

Install Rust, then run `cargo run --release`. The default Yahoo Finance chart uses an unofficial endpoint and is delayed by at least 15 minutes. Open the TradeCraft icon menu and choose Market data settings to select Tradier and enter your own production token. TradeCraft stores its own Tradier token in Windows Credential Locker or macOS Keychain, never in settings.json. The Yahoo endpoint is unofficial; check Yahoo's terms and data rights before distributing an app that uses it.
Install Rust, then run `cargo run --release`. The default Yahoo Finance chart uses an unofficial endpoint and is delayed by at least 15 minutes. Open the TradeCraft icon menu and choose Market data settings to select Tradier and enter your own production token. TradeCraft stores its own Tradier token in Windows Credential Locker or macOS Keychain, never in settings.json. Provider access and data use are subject to applicable third-party terms: [Yahoo Terms of Service](https://legal.yahoo.com/us/en/yahoo/terms/otos/index.html), [Tradier API FAQ](https://docs.tradier.com/brokerage-api/overview/faq), and [Kraken API terms](https://docs-legacy.kraken.com/api/docs/guides/global-intro/). The Yahoo endpoint is unofficial; permission for its automated use and distribution of the integration remains unverified. Linking provider terms does not grant access or resolve those questions.

TradeCraft connects from the user's device directly to the selected data provider; it does not relay or redistribute provider data through a TradeCraft-operated server. Tradier access uses the user's own account and token. The Yahoo and Kraken integrations use public endpoints without a user account in the app. Users are responsible for reviewing the applicable provider and exchange terms for their access, use, and any sharing or export of market data.

Community builds use `cargo build --release` and exclude the VibesTrader credential shortcut. Community provider preferences are stored separately in `settings-community.json`, so they start with Yahoo even if the personal build already uses Tradier. The personal build keeps its existing `settings.json`. Both files are under the local TradeCraft application-data folder. If both builds use a manually entered Tradier token, they share its Windows Credential Locker entry. For a personal build that includes the shortcut and updates the taskbar-pinned executable, run `powershell -NoProfile -ExecutionPolicy Bypass -File scripts/build-personal.ps1`. The script builds in a separate directory, verifies the result and replaces `target/personal/tradecraft.exe`, which the pin launches. A running TradeCraft window keeps the old build until fully quit and reopened; the previous executable is retained as a backup.

Expand Down
Loading
Loading