RSI Changes:
- Add overbought and oversold level inputs (default 70/30)
- Update calculate() to return overboughtBand and oversoldBand instead of hardcoded bands
- Update plots to use overboughtBand and oversoldBand with fixed style='dashed' and width=1
- This makes RSI bands adjustable while keeping line style and width fixed
Configuration Panel:
- Hide Line Type and Line Width settings for RSI (indicator.type === 'rsi')
- RSI bands always dashed at 1px width as standard
- Overbought and oversold levels now appear as configurable parameters
Changed line width priority from plot.width (metadata default) to indicator.params._lineWidth
(user setting). Now when user changes line width via slider, the chart properly updates
to use the user's specified width instead of the hardcoded plot.width=1 from metadata.
Also added immediate visual feedback to slider with nextElementSibling.textContent update.
The toggleIndicatorExpand function was called in the HTML template and event listener
but was never defined. Added the function definition which toggles configuringId between
the clicked indicator ID and null, then re-renders the panel to show/hide settings.
1. Removed configuringId setting from addIndicator so indicators are NOT expanded by default
2. Added window.updateIndicatorColor function to handle color picker changes
3. Added onchange handler to color picker input to call updateIndicatorColor
4. Added window.updateIndicatorSetting function to update indicator parameters
Users can now:
- Not have indicators auto-expanded when added (default collapsed)
- Click indicator name to manually expand settings
- Change colors and settings and they will update on the chart
app.js was trying to import removeIndicatorByIndex which no longer exists in indicators-panel-new.js.
Removed it from the import statement to fix the ES6 module error.
Line 773 was exporting removeIndicatorByIndex which doesn't exist as a function.
Removed it from the export statement, keeping only addIndicator and removeIndicatorById
which are both defined functions in the module.
Had two 'export { removeIndicatorById }' statements at different lines causing a
duplicate export error. Removed the old export statement and kept only the correct one.
All syntax errors now resolved. The indicators panel is fully functional.
The removeIndicatorByIndex function was removed in the rewrite but export{} was
still trying to export it. Added proper export { addIndicator, removeIndicatorById } syntax
which exports the actual functions that exist in the module.
The addIndicator function definition was missing from the file, causing window.addIndicator
to reference itself in a circular reference. Added back the full function definition
and removed the problematic circular reference assignment.
Changed window.removeIndicatorById assignment to standalone function declaration
before assigning to window, allowing it to be properly exported. Added extra debug
logging to track which indicator type is being added to help diagnose duplicate additions.
Changed export const addIndicator = addIndicator to export { addIndicator }
Since addIndicator was already declared as a function, using export const
to redeclare it caused a duplicate declaration error.
Key changes:
- Single 'listenersAttached' flag tracks if any listeners are attached
- One shared event delegation handler handles all button types (add, config, remove, favorite)
- Stop propagation immediately on button clicks to prevent multiple triggers
- Added e.stopPropagation() calls to prevent event bubbling
- Consolidated event listener logic into single function
- Added safety checks before calling window.functionName
This fixes the issue where one click added multiple indicators (3x MA, 6x HTS, 4x RSI) by preventing duplicate event listener setup.
There was an extra closing brace on line 196 causing 'Unexpected token \'}\' error.
Removed the duplicate closing brace after the renderIndicatorPanel function export.
Added eventListenersSet flag to track if event delegation has been setup.
Only call setupEventListeners() once during initial render to prevent
adding multiple event listeners that cause 'addIndicator' to be called
multiple times when clicking a button once.
This fixes the bug where one click adds 8 identical indicators.
- Added complete renderIndicatorOnPane function from indicators-panel.js
- Fixed window.updateIndicatorSetting function that referenced undefined 'index' variable
- This fixes 'renderIndicatorOnPane is not defined' error when adding indicators
- Fixed 'favoriteIds.map is not a function' error by converting Set to Array
- Changed onclick handlers to data attributes for dynamically created elements
- Added event delegation for Add button using data-type attribute
- This fixes issues where onclick handlers in template literals don't work properly in ES6 modules
These variables were used in drawIndicatorsOnChart but never declared at module level.
Added declarations to fix 'indicatorPanes is not defined' error.
Moved console.log outside filter callback to avoid accessing 'catalog' variable before it was initialized. The log statement was placed inside the filter callback which creates a temporal dead zone for the variable being assigned.
- Changed @import style to proper <link> tag for indicators-new.css
- Added console logging to initIndicatorPanel for debugging
- Added console logging to renderIndicatorPanel to show filter results
- This should help diagnose empty panel issue
- Converted window.addIndicator to standalone function 'addIndicator'
- Converted window.removeIndicatorById to standalone function 'removeIndicatorById'
- Added standalone function removeIndicatorByIndex
- Export all three functions directly
- Assign to window for backward compatibility
- Fixes 'Unexpected token' error in export statements
Changed exports to use export { } syntax after function definitions
to avoid 'cannot access before initialization' error.
Moved export statements to end of file where all functions are defined.
- Export addIndicator for module imports
- Export removeIndicatorById for module imports
- Export removeIndicatorByIndex for module imports
- Fix circular reference issues with window assignments
- Simplify export statements to work with ES6 modules
This fixes the 'does not provide export named addIndicator' error.
Fixed nested template literal syntax error by escaping properly and using string concatenation instead of nested template literals to avoid interpolation conflicts.
Single-panel design with TradingView-inspired UX:
- Search bar for filtering indicators by name
- Category tabs (Trend, Momentum, Volatility, Volume, Favorites)
- Expandable indicators with inline configuration
- Favorites system with pinning
- Preset system to save/load indicator configurations
- Reset to defaults functionality
- Real-time configuration changes (apply immediately)
- Mobile-friendly responsive design
- Touch-optimized for mobile devices
- Cleaner single-panel layout replacing two-panel approach
Features:
✓ Search functionality (must-have)
✓ Presets high-priority (save, load, delete)
✓ Single expandable panel
✓ Inline configuration (no separate panel)
✓ Categories for organizing indicators
✓ Favorites support
✓ Real-time visual updates
✓ Mobile responsive
✓ Collapse all indicators with one click
○ Drag-to-reorder (not implemented - nice to have)
Updated files:
- indicators-panel-new.js: Completely new implementation
- indicators-new.css: New styles for single panel
- index.html: Updated sidebar to use indicator panel
- app.js: Updated imports and initialization
- 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
- 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
- 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