diff --git a/src/api/dashboard/static/js/ui/indicators-panel-new.js b/src/api/dashboard/static/js/ui/indicators-panel-new.js index 0f3bbb5..8388400 100644 --- a/src/api/dashboard/static/js/ui/indicators-panel-new.js +++ b/src/api/dashboard/static/js/ui/indicators-panel-new.js @@ -697,7 +697,7 @@ function renderIndicatorOnPane(indicator, meta, instance, candles, paneIndex, li topFillColor2: '#00000000', bottomFillColor1: '#00000000', bottomColor: plot.bottomColor || '#00000000', - lineWidth: indicator.params._lineWidth || plot.width || lineWidth, + lineWidth: plot.width || indicator.params._lineWidth || lineWidth, lineStyle: plotLineStyle, title: plot.title || '', priceLineVisible: false, @@ -706,7 +706,7 @@ function renderIndicatorOnPane(indicator, meta, instance, candles, paneIndex, li } else { series = window.dashboard.chart.addSeries(LightweightCharts.LineSeries, { color: plotColor, - lineWidth: indicator.params._lineWidth || plot.width || lineWidth, + lineWidth: plot.width || indicator.params._lineWidth || lineWidth, lineStyle: plotLineStyle, title: plot.title || '', priceLineVisible: false, @@ -716,6 +716,41 @@ function renderIndicatorOnPane(indicator, meta, instance, candles, paneIndex, li series.setData(data); indicator.series.push(series); + + // Create horizontal band lines for RSI + if (meta.name === 'RSI' && indicator.series.length > 0) { + const mainSeries = indicator.series[0]; + const overbought = indicator.params.overbought || 70; + const oversold = indicator.params.oversold || 30; + + // Remove existing price lines first + while (indicator.bands && indicator.bands.length > 0) { + try { + indicator.bands.pop(); + } catch(e) {} + } + indicator.bands = indicator.bands || []; + + // Create overbought band line + indicator.bands.push(mainSeries.createPriceLine({ + price: overbought, + color: '#787B86', + lineWidth: 1, + lineStyle: LightweightCharts.LineStyle.Dashed, + axisLabelVisible: false, + title: '' + })); + + // Create oversold band line + indicator.bands.push(mainSeries.createPriceLine({ + price: oversold, + color: '#787B86', + lineWidth: 1, + lineStyle: LightweightCharts.LineStyle.Dashed, + axisLabelVisible: false, + title: '' + })); + } }); }