From 4a34245410d991d18c5f961c07f00bd3db25d7e8 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 6 Oct 2021 12:46:54 +0200 Subject: [PATCH] deepscan bug fixes --- .../Trading-Bot/Low-Frequency-Trading/OrdersCalculations.js | 1 - .../Trading-Bot/Low-Frequency-Trading/OrdersSimulations.js | 1 - .../Trading-Bot/Low-Frequency-Trading/TradingEngine.js | 2 +- .../Trading-Bot/Low-Frequency-Trading/TradingEpisode.js | 1 - .../Trading-Bot/Low-Frequency-Trading/TradingStrategy.js | 2 +- .../TS/Bot-Modules/API-Data-Fetcher-Bot/FetchingProcess.js | 4 ++-- .../Candles-Volumes/CandlesVolumesMultiTimeFrameDaily.js | 2 -- .../Candles-Volumes/CandlesVolumesMultiTimeFrameMarket.js | 2 -- .../TS/Bot-Modules/Indicator-Bot/IndicatorOutput.js | 1 - .../Learning-Bot/Low-Frequency-Learning/LearningEngine.js | 1 - .../Learning-Bot/Low-Frequency-Learning/LearningEpisode.js | 1 - 11 files changed, 4 insertions(+), 14 deletions(-) diff --git a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/OrdersCalculations.js b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/OrdersCalculations.js index 910d016f4..af77160a7 100644 --- a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/OrdersCalculations.js +++ b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/OrdersCalculations.js @@ -2,7 +2,6 @@ exports.newAlgorithmicTradingBotModulesOrdersCalculations = function (processInd /* When we are live trading, we need to syncronize with the exchange. */ - const MODULE_NAME = 'Orders Calculations' let thisObject = { actualSizeCalculation: actualSizeCalculation, diff --git a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/OrdersSimulations.js b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/OrdersSimulations.js index 1d3ea0ac6..ad4d246ae 100644 --- a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/OrdersSimulations.js +++ b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/OrdersSimulations.js @@ -2,7 +2,6 @@ exports.newAlgorithmicTradingBotModulesOrdersSimulations = function (processInde /* When we are backtesting or paper trading, we need to simulate what would have happened at the exchange. */ - const MODULE_NAME = 'Orders Simulations' let thisObject = { actualSizeSimulation: actualSizeSimulation, diff --git a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingEngine.js b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingEngine.js index 441e5bfb7..c04a0eea0 100644 --- a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingEngine.js +++ b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingEngine.js @@ -3,7 +3,7 @@ exports.newAlgorithmicTradingBotModulesTradingEngine = function (processIndex) { We call the Trading Engine to the data structure that is needed in order to exevute the trading protocol with the specific rules defined at the Trading System. */ - const MODULE_NAME = 'Trading Engine' + let thisObject = { mantain: mantain, reset: reset, diff --git a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingEpisode.js b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingEpisode.js index 44f563cca..f70284899 100644 --- a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingEpisode.js +++ b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingEpisode.js @@ -2,7 +2,6 @@ exports.newAlgorithmicTradingBotModulesTradingEpisode = function (processIndex) /* This module packages all functions related to Episodes. */ - const MODULE_NAME = 'Trading Episode' let thisObject = { mantain: mantain, reset: reset, diff --git a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingStrategy.js b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingStrategy.js index c18aefd1d..be2a09c31 100644 --- a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingStrategy.js +++ b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingStrategy.js @@ -2,7 +2,7 @@ exports.newAlgorithmicTradingBotModulesTradingStrategy = function (processIndex) /* This module packages all functions related to Strategies. */ - const MODULE_NAME = 'Trading Strategy' + let thisObject = { mantain: mantain, reset: reset, diff --git a/Projects/Data-Mining/TS/Bot-Modules/API-Data-Fetcher-Bot/FetchingProcess.js b/Projects/Data-Mining/TS/Bot-Modules/API-Data-Fetcher-Bot/FetchingProcess.js index a343e5684..e0acf093e 100644 --- a/Projects/Data-Mining/TS/Bot-Modules/API-Data-Fetcher-Bot/FetchingProcess.js +++ b/Projects/Data-Mining/TS/Bot-Modules/API-Data-Fetcher-Bot/FetchingProcess.js @@ -868,7 +868,7 @@ exports.newDataMiningBotModulesFetchingProcess = function (processIndex) { Building the current key... */ let key = "" - for (j = 0; j < primaryKeys.length; j++) { + for (let j = 0; j < primaryKeys.length; j++) { let keyValue = record.map.get(primaryKeys[j]) key = key + '->' + keyValue } @@ -887,7 +887,7 @@ exports.newDataMiningBotModulesFetchingProcess = function (processIndex) { let record = getRecord(dataReceivedArray[i]) let key = "" - for (j = 0; j < primaryKeys.length; j++) { + for (let j = 0; j < primaryKeys.length; j++) { let keyValue = record.map.get(primaryKeys[j]) key = key + '->' + keyValue } diff --git a/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/Candles-Volumes/CandlesVolumesMultiTimeFrameDaily.js b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/Candles-Volumes/CandlesVolumesMultiTimeFrameDaily.js index e50e98bc7..b1f43ac9d 100644 --- a/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/Candles-Volumes/CandlesVolumesMultiTimeFrameDaily.js +++ b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/Candles-Volumes/CandlesVolumesMultiTimeFrameDaily.js @@ -440,7 +440,6 @@ return } - const inputVolumesPerdiod = 60 * 1000; // 1 min const inputFilePeriod = 24 * 60 * 60 * 1000; // 24 hs let totalOutputVolumes = inputFilePeriod / outputPeriod; // this should be 2 in this case. let beginingOutputTime = contextVariables.datetimeLastProducedFile.valueOf(); @@ -577,7 +576,6 @@ let fileContent = ""; for (let i = 0; i < volumes.length; i++) { - let candle = volumes[i]; fileContent = fileContent + separator + '[' + volumes[i].buy + "," + volumes[i].sell + "," + volumes[i].begin + "," + volumes[i].end + "]"; if (separator === "") { separator = ","; } fileRecordCounter++ diff --git a/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/Candles-Volumes/CandlesVolumesMultiTimeFrameMarket.js b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/Candles-Volumes/CandlesVolumesMultiTimeFrameMarket.js index 51f986645..89ccadd17 100644 --- a/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/Candles-Volumes/CandlesVolumesMultiTimeFrameMarket.js +++ b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/Candles-Volumes/CandlesVolumesMultiTimeFrameMarket.js @@ -677,7 +677,6 @@ callBackFunction(err); return; } - const inputVolumesPerdiod = 60 * 1000; // 1 min const inputFilePeriod = 24 * 60 * 60 * 1000; // 24 hs let totalOutputVolumes = inputFilePeriod / outputPeriod; // this should be 2 in this case. @@ -813,7 +812,6 @@ let fileContent = ""; for (let i = 0; i < volumes.length; i++) { - let candle = volumes[i]; fileContent = fileContent + separator + '[' + volumes[i].buy + "," + volumes[i].sell + "," + volumes[i].begin + "," + volumes[i].end + "]"; if (separator === "") { separator = ","; } fileRecordCounter++ diff --git a/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/IndicatorOutput.js b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/IndicatorOutput.js index 68129a3ff..b97a1f896 100644 --- a/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/IndicatorOutput.js +++ b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/IndicatorOutput.js @@ -74,7 +74,6 @@ let outputData // Data built as a result of applying user defined code and formulas at the Data Building Procedure let singularVariableName // Name of the variable for this product let recordDefinition // Record as defined by the user at the UI - let fileContent // Here we store the contents of the new data built just before writing it to a file. let resultsWithIrregularPeriods // A product will have irregular periods when the User Code inserts new result records at will, in contrast with normal procedure where the platform insert one record per loop execution. /* diff --git a/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningEngine.js b/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningEngine.js index c63f52b31..2f6941f32 100644 --- a/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningEngine.js +++ b/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningEngine.js @@ -3,7 +3,6 @@ exports.newMachineLearningBotModulesLearningEngine = function (processIndex) { We call the Learning Engine to the data structure that is needed in order to exevute the learning protocol with the specific rules defined at the Learning System. */ - const MODULE_NAME = 'Learning Engine' let thisObject = { mantain: mantain, reset: reset, diff --git a/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningEpisode.js b/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningEpisode.js index 6ea0bdb39..db63b0b40 100644 --- a/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningEpisode.js +++ b/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningEpisode.js @@ -2,7 +2,6 @@ exports.newMachineLearningBotModulesLearningEpisode = function (processIndex) { /* This module packages all functions related to Episodes. */ - const MODULE_NAME = 'Learning Episode' let thisObject = { mantain: mantain, reset: reset,