From 3779e7c4991247da8804201a1b4c73e8ae318a2b Mon Sep 17 00:00:00 2001 From: DiTus Date: Sun, 1 Mar 2026 19:46:41 +0100 Subject: [PATCH] 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. --- .../static/js/indicators/moving_average.js | 37 ------------------- 1 file changed, 37 deletions(-) diff --git a/src/api/dashboard/static/js/indicators/moving_average.js b/src/api/dashboard/static/js/indicators/moving_average.js index c38cf6b..ea89324 100644 --- a/src/api/dashboard/static/js/indicators/moving_average.js +++ b/src/api/dashboard/static/js/indicators/moving_average.js @@ -211,43 +211,6 @@ let maValues; 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