feat: updated bottom menu toggle logic and hurst bands color

This commit is contained in:
DiTus
2026-03-19 22:49:51 +01:00
parent eedd532ba7
commit a9be584c0e
2 changed files with 30 additions and 6 deletions

View File

@ -773,18 +773,25 @@ function addIndicator(type) {
// Override with Hurst-specific defaults
if (type === 'hurst') {
const hurstCount = activeIndicators.filter(ind => ind.type === 'hurst').length;
const color = hurstCount > 0 ? '#ff9800' : '#9e9e9e';
params._lineWidth = 1;
params.timeframe = 'chart';
params.markerBuyShape = 'custom';
params.markerSellShape = 'custom';
params.markerBuyColor = '#9e9e9e';
params.markerSellColor = '#9e9e9e';
params.markerBuyColor = color;
params.markerSellColor = color;
params.markerBuyCustom = '▲';
params.markerSellCustom = '▼';
}
metadata.plots.forEach((plot, idx) => {
params[`_color_${idx}`] = plot.color || getDefaultColor(activeIndicators.length + idx);
if (type === 'hurst' && activeIndicators.filter(ind => ind.type === 'hurst').length > 0) {
params[`_color_${idx}`] = '#ff9800';
} else {
params[`_color_${idx}`] = plot.color || getDefaultColor(activeIndicators.length + idx);
}
});
metadata.inputs.forEach(input => {
params[input.name] = input.default;