Add configurable RSI levels and remove line settings for RSI
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
This commit is contained in:
@ -281,6 +281,7 @@ return `
|
||||
`.trim() + '';
|
||||
}).join('')}
|
||||
|
||||
${indicator.type !== 'rsi' ? `
|
||||
<div class="config-row">
|
||||
<label>Line Type</label>
|
||||
<select onchange="window.updateIndicatorSetting && window.updateIndicatorSetting('${indicator.id}', '_lineType', this.value)">
|
||||
@ -293,6 +294,7 @@ return `
|
||||
<input type="range" min="1" max="5" value="${indicator.params._lineWidth || 2}" onchange="this.nextElementSibling.textContent = this.value; window.updateIndicatorSetting && window.updateIndicatorSetting('${indicator.id}', '_lineWidth', parseInt(this.value))">
|
||||
<span class="range-value">${indicator.params._lineWidth || 2}</span>
|
||||
</div>
|
||||
` : ''}
|
||||
</div>
|
||||
|
||||
${meta?.inputs && meta.inputs.length > 0 ? `
|
||||
|
||||
Reference in New Issue
Block a user