feat: updated bottom menu toggle logic and hurst bands color
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user