Fix: Remove duplicate code in moving_average.js

The file had duplicate calculate() and getMetadata() methods causing syntax errors.
Removed duplicate code from lines 214-251.
Now the file has a single proper implementation.
This commit is contained in:
DiTus
2026-03-01 19:46:41 +01:00
parent 71bc034590
commit 3779e7c499

View File

@ -211,43 +211,6 @@ let maValues;
displayMode: 'overlay' displayMode: 'overlay'
}; };
} }
return maValues;
}
getMetadata() {
return {
name: 'MA',
description: 'Moving Average (SMA/EMA/RMA/WMA/VWMA)',
inputs: [
{
name: 'period',
label: 'Period',
type: 'number',
default: 44,
min: 1,
max: 500
},
{
name: 'maType',
label: 'MA Type',
type: 'select',
options: ['SMA', 'EMA', 'RMA', 'WMA', 'VWMA'],
default: 'SMA'
}
],
plots: [
{
id: 'value',
color: '#2962ff',
title: 'MA',
style: 'solid',
width: 1
}
],
displayMode: 'overlay'
};
}
} }
// Export signal function for external use // Export signal function for external use