Repository navigation
fix(market): label and measure 5m Hyperliquid intraday series correctly - #1567
Open
creativityventures wants to merge 4 commits into
Open
creativityventures wants to merge 4 commits into
creativityventures wants to merge 4 commits into
Conversation
Add IntradayData.Interval so the formatter knows whether the series is 3m or 5m (Hyperliquid). Co-authored-by: Claude <noreply@anthropic.com>
Hyperliquid intraday data is fetched as 5m candles, but Format labelled it "3-minute intervals" / "3m ATR", and the 1h change looked 20 bars back (100 minutes on 5m). Compute the 1h lookback from the interval and use it in the labels. Fixes NoFxAiOS#1562 Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
creativityventures
requested review from
SkywalkerJi,
hzb1115 and
tangmengqiu
as code owners
November 20, 2026 09:09
|
|
1 similar comment
|
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GetWithExchangefetches 5m candles, butFormatlabels the series "3‑minute intervals" and "3m ATR", and the "1h change" looks 20 bars back, which is 100 minutes on 5m data. The strategy engine also hard-codes "3m ATR" (kernel/engine_prompt.go). So the model is told the wrong timeframe and gets a wrong 1h change (market.Format labels Hyperliquid 5m series as "3-minute intervals" #1562).IntradayData.Intervalrecords the K-line interval of the series ("3m"or"5m"). Empty keeps the legacy 3m default (intervalOrDefault).intradayPriceChange1h(klines, interval)computes the 1h lookback from the interval: 20 bars on 3m, 12 bars on 5m.Formatand the engine's ATR label use the actual interval (the engine usesklineConfig.PrimaryTimeframe, as the line above it already does).gofmtalso realigned theGridDirectioncomments inmarket/types.go.Change Type
Scope
Trading engine / strategies
MCP / AI clients
API / server
Web UI / frontend
Config / deployment
CI/CD / infra
Linked Issues
Testing
What you verified and how:
go build ./...passesgo test ./...passes (rango test ./market/ ./kernel/, both pass; I didn't run the whole repo)New
market/data_interval_test.go: the 1h change uses 20 bars on 3m and 12 on 5m, returns 0 without a full hour or with an unknown interval, andFormatlabels a 5m series as 5‑minute /5m ATRwhile legacy data keeps the 3m labels. These tests don't compile ondevwithout the change. I didn't run the bot against Hyperliquid.Security Impact
Compatibility
🤖 Generated with Claude Code
https://claude.ai/code/session_014cRzwuyJe8BGwXowsQ3kpw