Commit Graph

19 Commits

Author SHA1 Message Date
ea49c9b15a fixed timezone: removed duplicate +1h from formatDate (tickMarkFormatter already handles it) 2026-03-01 22:33:54 +01:00
e727f069e1 also call updateIndicatorCandles on new data 2026-03-01 21:28:21 +01:00
264ce72737 reverted order method - not available in lightweight-charts v5 2026-03-01 21:25:51 +01:00
37b41caedc fixed z-order so indicators appear on top of price candles 2026-03-01 21:24:43 +01:00
ef43b128d5 removed duplicate scrollToRealTime that may interfere with indicator redraw 2026-03-01 21:18:38 +01:00
780ecfdfb5 improved indicator redraw on new candles with error handling 2026-03-01 21:15:24 +01:00
9c560a5786 fixed time zone to UTC+1 for Warsaw 2026-03-01 20:29:18 +01:00
e52b177102 Fix: Move timeFormatter to localization object
The timeFormatter must be inside localization.timeScale to properly format
time axis labels. This ensures the x-axis time labels display UTC+1 time correctly.
2026-03-01 20:20:30 +01:00
234e293256 Fix: Show UTC+1 time on chart and fix indicator redrawing
Changes:
1. UTC+1 Time Display
   - Updated formatDate() to add 1 hour offset for Central European Time (UTC+1)
   - Added timeFormatter to chart timeScale for x-axis labels
   - Both signal display and chart time axis now show UTC+1 time

2. Fix Indicator Redrawing
   - Added missing getActiveIndicators() call in drawIndicatorsOnChart
   - Fixed variable scope issue where activeIndicators wasn't defined
   - Ensures indicators are properly removed and recreated when new candles close
2026-03-01 20:17:14 +01:00
0df8547d96 Fix: Signal date tracking and indicator real-time updates
Issue 1: Only update lastSignalDate when signal type changes (BUY→SELL or SELL→BUY)
- Modified clearIndicatorCaches() to accept clearSignalState parameter
- When new candle completes: only clear cachedResults/cachedMeta (not signal state)
- When timeframe changes: clear everything including signal tracking
- This preserves signal change history across multiple candles

Issue 2: Indicator lines not updating when new candles arrive
- Added updateIndicatorCandles() function to update existing series
- Instead of removing and recreating series, now uses .setData() to update
- Called when new candle is detected to update indicator lines
- Chart renders correctly with new data after each candle completion

Both issues now resolved:
1. Shows last crossover date only when signal actually changes
2. Indicator lines update in real-time when new candles complete
2026-03-01 20:07:12 +01:00
61aaa2d122 Add indicator recalculation on timeframe change and new candle
Changes:
- Added lastCandleTimestamp to track candle completion
- Detect new candle when timestamp increases
- Clear indicator caches when new candle detected
- Clear indicator caches when timeframe changes
- Recalculate indicators and signals in both cases
- Refresh chart when new candle is detected

This ensures indicators are always recalculated with fresh data when:
1. Timeframe is switched
2. A new candle completes

Both cases now force:
- Cache clearing
- Indicator recalculation
- Chart refresh
- Signal recalculation
2026-03-01 19:58:14 +01:00
11c805917c Fix: Change datetime format in Indicator Analysis panel
- Changed date format to DD/MM/YY HH:mm format
- Removed 'Last: ' prefix from signal display
- Added formatDate() helper function for consistent formatting
2026-03-01 19:53:11 +01:00
33f49b1559 Fix MA rendering and simplify signal UI
- Fixed MA plot ID to match return structure (ma vs value)
- Moved Status and Last Signal display to main Indicator Analysis section
- Removed Signal Status section from expanded indicator config
- Simplified signal display to show only status icon/type and last signal date
- Removed strength and reasoning tooltips from signal display
2026-03-01 19:45:28 +01:00
899d9174e4 Add indicator signals feature with buy/sell/hold analysis
- Add signals-calculator.js module for calculating buy/sell/hold signals for all indicators
- Integrate signals into Trend Analysis panel (renamed to Indicator Analysis)
- Display individual indicator signals with badges, values, strength bars, and detailed reasoning
- Add aggregate summary signal showing overall recommendation from all indicators
- Support signals for RSI, MACD, Stochastic, Bollinger Bands, SMA/EMA, ATR, and HTS
- Provide tooltips on hover showing indicator value, configuration, and reasoning
- Ensure indicators calculate on all available candles, not just recent ones
- Cache indicator calculations for performance while recalculating on historical data loads
- Style improvements: monospace font, consistent button widths, reduced margins
- Add AGENTS.md documentation file with project guidelines
2026-02-26 23:46:33 +01:00
3a8040590b Fix: Prevent indicators from being deleted during TF switch
- Remove window.renderIndicatorList() call from renderTA()
- This was triggering initIndicatorPanel during each TF switch
- Added logging to removeIndicatorById to track unexpected deletions
- Removed indicator configuration UI from TA panel (sidebar handles this now)
2026-02-26 15:14:34 +01:00
5f84215acd Add tab system to right sidebar with Indicators and Strategies
- Add two-tab navigation (Indicators, Strategies) in right sidebar
- Move all strategy-related content to Strategies tab
- Implement sidebar collapse/expand functionality
- Add indicator visibility toggle (eye button)
- Fix bug where wrong interval data was deleted on TF switch
- Add localStorage persistence for sidebar state and active tab
- Ensure indicators recalculate when TF changes
2026-02-26 14:56:03 +01:00
6dc9cf5a63 Prevent TA panel refresh when changing timeframes
- Removed automatic TA reload when switching timeframes
- TA panel now only loads on initial page load and when manually refreshed
- User must click Refresh button to update TA after timeframe change
2026-02-25 22:17:57 +01:00
258ac8eef2 Fix dashboard loading and maximize chart area
- Fixed TA panel loading state - now waits for initial data before loading technical analysis
- Changed initial loading message from 'Loading technical analysis...' to 'Waiting for candle data...'
- Made strategy simulation sidebar collapsed by default to maximize chart area
- Added refresh timestamp to TA panel when manually refreshed
- Improved error messages for when data isn't available in database
2026-02-25 22:16:12 +01:00
c7ee5135ae Initial commit - BTC Trading Dashboard
- FastAPI backend with PostgreSQL database connection
- Frontend dashboard with lightweight-charts
- Technical indicators (SMA, EMA, RSI, MACD, Bollinger Bands, etc.)
- Trading strategy simulation and backtesting
- Database connection to NAS at 20.20.20.20:5433
- Development server setup and documentation
2026-02-25 22:10:30 +01:00