diff --git a/Environment.js b/Environment.js index 38ae6186b4..62c9cb43b3 100644 --- a/Environment.js +++ b/Environment.js @@ -4,9 +4,9 @@ exports.newEnvironment = function () { WEB_SERVER_URL: 'localhost', CLIENT_WEB_SOCKETS_INTERFACE_PORT: 18041, CLIENT_HTTP_INTERFACE_PORT: 34248, - PATH_TO_DATA_STORAGE: './Data-Storage', + PATH_TO_DATA_STORAGE: './Platform/Data-Storage', + PATH_TO_LOG_FILES: './Platform/Log-Files', PATH_TO_PROJECTS: './Projects', - PATH_TO_LOG_FILES: './Log-Files', PATH_TO_PROJECTS_REQUIRED: './Projects', PATH_TO_PROJECT_SCHEMA: './Projects/ProjectsSchema.json', PATH_TO_CLIENT: './Platform', diff --git a/EnvironmentForDebug.js b/EnvironmentForDebug.js index efb5fec7bd..621af7b3c1 100644 --- a/EnvironmentForDebug.js +++ b/EnvironmentForDebug.js @@ -8,9 +8,9 @@ exports.newEnvironment = function () { DESKTOP_WEB_SOCKETS_INTERFACE_HOST: 'localhost', CLIENT_HTTP_INTERFACE_PORT: 34248, DESKTOP_HTTP_INTERFACE_PORT: 34249, - PATH_TO_DATA_STORAGE: './Data-Storage', + PATH_TO_DATA_STORAGE: './Platform/Data-Storage', + PATH_TO_LOG_FILES: './Platform/Log-Files', PATH_TO_PROJECTS: './Projects', - PATH_TO_LOG_FILES: './Log-Files', PATH_TO_PROJECTS_REQUIRED: './Projects', PATH_TO_PROJECT_SCHEMA: './Projects/ProjectsSchema.json', PATH_TO_CLIENT: './Platform', diff --git a/Projects/Data-Mining/Icons/data-mining.png b/Projects/Data-Mining/Icons/data-mining.png new file mode 100644 index 0000000000..f8b8fa7917 Binary files /dev/null and b/Projects/Data-Mining/Icons/data-mining.png differ diff --git a/Projects/Data-Mining/Schemas/App-Schema/data-mining-project.json b/Projects/Data-Mining/Schemas/App-Schema/data-mining-project.json new file mode 100644 index 0000000000..d31a511cb3 --- /dev/null +++ b/Projects/Data-Mining/Schemas/App-Schema/data-mining-project.json @@ -0,0 +1,42 @@ +{ + "type": "Data-Mining Project", + "menuItems": [ + { + "action": "Add Missing Children", + "label": "Add Missing Children", + "relatedUiObject": "Foundations Project", + "actionFunction": "payload.executeAction" + }, + { + "action": "Delete UI Object", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "actionFunction": "payload.executeAction", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity" + } + ], + "isProjectHead": true, + "isTitleAllwaysVisible": false, + "addLeftIcons": true, + "isPinned": true, + "positionLocked": true, + "icon": "data-mining", + "childrenNodesProperties": [ + { + "name": "projectDefinition", + "type": "node", + "childType": "Project Definition", + "project": "Foundations", + "autoAdd": true + }, + { + "name": "mines", + "type": "node", + "childType": "Mines", + "project": "Foundations", + "autoAdd": true + } + ] +} \ No newline at end of file diff --git a/Projects/Foundations/TS/Bot-Modules/API-Data-Fetcher-Bot/FetchingProcess.js b/Projects/Data-Mining/TS/Bot-Modules/API-Data-Fetcher-Bot/FetchingProcess.js similarity index 99% rename from Projects/Foundations/TS/Bot-Modules/API-Data-Fetcher-Bot/FetchingProcess.js rename to Projects/Data-Mining/TS/Bot-Modules/API-Data-Fetcher-Bot/FetchingProcess.js index 1c3a6ef549..a343e56848 100644 --- a/Projects/Foundations/TS/Bot-Modules/API-Data-Fetcher-Bot/FetchingProcess.js +++ b/Projects/Data-Mining/TS/Bot-Modules/API-Data-Fetcher-Bot/FetchingProcess.js @@ -1,5 +1,5 @@ -exports.newFoundationsBotModulesFetchingProcess = function (processIndex) { +exports.newDataMiningBotModulesFetchingProcess = function (processIndex) { const MODULE_NAME = "Fetching Process"; diff --git a/Projects/Foundations/TS/Bot-Modules/API-Data-Fetcher-Bot/SingleMarketAPIDataFetcherBot.js b/Projects/Data-Mining/TS/Bot-Modules/API-Data-Fetcher-Bot/SingleMarketAPIDataFetcherBot.js similarity index 99% rename from Projects/Foundations/TS/Bot-Modules/API-Data-Fetcher-Bot/SingleMarketAPIDataFetcherBot.js rename to Projects/Data-Mining/TS/Bot-Modules/API-Data-Fetcher-Bot/SingleMarketAPIDataFetcherBot.js index b0b9dea236..b87eb3483f 100644 --- a/Projects/Foundations/TS/Bot-Modules/API-Data-Fetcher-Bot/SingleMarketAPIDataFetcherBot.js +++ b/Projects/Data-Mining/TS/Bot-Modules/API-Data-Fetcher-Bot/SingleMarketAPIDataFetcherBot.js @@ -1,4 +1,4 @@ -exports.newFoundationsBotModulesSingleMarketAPIDataFetcherBot = function (processIndex) { +exports.newDataMiningBotModulesSingleMarketAPIDataFetcherBot = function (processIndex) { const MODULE_NAME = "Single Market API Data Fetcher Bot"; @@ -41,7 +41,8 @@ exports.newFoundationsBotModulesSingleMarketAPIDataFetcherBot = function (proces let botModuleDefinition = TS.projects.foundations.functionLibraries.taskFunctions.getBotModuleByName( TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.config.botModule ) - let project = TS.projects[TS.projects.foundations.globals.taskConstants.PROJECT_DEFINITION_NODE.config.codeName.toLowerCase()] + let projectCodeName = TS.projects.foundations.globals.taskConstants.PROJECT_DEFINITION_NODE.config.codeName + let project = TS.projects[PROJECTS_SCHEMA_MAP.get(projectCodeName).propertyName] let botModule = project.botModules[botModuleDefinition.propertyName] let moduleFunction = botModule[botModuleDefinition.functionName] botModuleObject = moduleFunction(processIndex) diff --git a/Projects/Foundations/TS/Bot-Modules/Indicator-Bot/Bollinger-Bands/BollingerBandsMultiTimeFrameDaily.js b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/Bollinger-Bands/BollingerBandsMultiTimeFrameDaily.js similarity index 99% rename from Projects/Foundations/TS/Bot-Modules/Indicator-Bot/Bollinger-Bands/BollingerBandsMultiTimeFrameDaily.js rename to Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/Bollinger-Bands/BollingerBandsMultiTimeFrameDaily.js index e7a62f89e6..8566dfd9bf 100644 --- a/Projects/Foundations/TS/Bot-Modules/Indicator-Bot/Bollinger-Bands/BollingerBandsMultiTimeFrameDaily.js +++ b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/Bollinger-Bands/BollingerBandsMultiTimeFrameDaily.js @@ -1,4 +1,4 @@ -exports.newFoundationsBotModulesBollingerBandsMultiTimeFrameDaily = function (processIndex) { +exports.newDataMiningBotModulesBollingerBandsMultiTimeFrameDaily = function (processIndex) { const MODULE_NAME = "Bollinger Bands Multi Time Frame Daily" const CANDLES_FOLDER_NAME = "Candles" diff --git a/Projects/Foundations/TS/Bot-Modules/Indicator-Bot/Bollinger-Bands/BollingerBandsMultiTimeFrameMarket.js b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/Bollinger-Bands/BollingerBandsMultiTimeFrameMarket.js similarity index 99% rename from Projects/Foundations/TS/Bot-Modules/Indicator-Bot/Bollinger-Bands/BollingerBandsMultiTimeFrameMarket.js rename to Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/Bollinger-Bands/BollingerBandsMultiTimeFrameMarket.js index 77415d46e2..70c615653f 100644 --- a/Projects/Foundations/TS/Bot-Modules/Indicator-Bot/Bollinger-Bands/BollingerBandsMultiTimeFrameMarket.js +++ b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/Bollinger-Bands/BollingerBandsMultiTimeFrameMarket.js @@ -1,4 +1,4 @@ -exports.newFoundationsBotModulesBollingerBandsMultiTimeFrameMarket = function (processIndex) { +exports.newDataMiningBotModulesBollingerBandsMultiTimeFrameMarket = function (processIndex) { const MODULE_NAME = "Bollinger Bands Multi Time Frame Market" const CANDLES_FOLDER_NAME = "Candles" diff --git a/Projects/Foundations/TS/Bot-Modules/Indicator-Bot/Candles-Volumes/CandlesVolumesMultiTimeFrameDaily.js b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/Candles-Volumes/CandlesVolumesMultiTimeFrameDaily.js similarity index 99% rename from Projects/Foundations/TS/Bot-Modules/Indicator-Bot/Candles-Volumes/CandlesVolumesMultiTimeFrameDaily.js rename to Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/Candles-Volumes/CandlesVolumesMultiTimeFrameDaily.js index 56962ad7fa..e50e98bc77 100644 --- a/Projects/Foundations/TS/Bot-Modules/Indicator-Bot/Candles-Volumes/CandlesVolumesMultiTimeFrameDaily.js +++ b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/Candles-Volumes/CandlesVolumesMultiTimeFrameDaily.js @@ -1,4 +1,4 @@ -exports.newFoundationsBotModulesCandlesVolumesMultiTimeFrameDaily = function (processIndex) { +exports.newDataMiningBotModulesCandlesVolumesMultiTimeFrameDaily = function (processIndex) { const MODULE_NAME = "Candles Volumes Multi Time Frame Daily"; const CANDLES_FOLDER_NAME = "Candles"; diff --git a/Projects/Foundations/TS/Bot-Modules/Indicator-Bot/Candles-Volumes/CandlesVolumesMultiTimeFrameMarket.js b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/Candles-Volumes/CandlesVolumesMultiTimeFrameMarket.js similarity index 99% rename from Projects/Foundations/TS/Bot-Modules/Indicator-Bot/Candles-Volumes/CandlesVolumesMultiTimeFrameMarket.js rename to Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/Candles-Volumes/CandlesVolumesMultiTimeFrameMarket.js index ea86ca2f61..51f986645f 100644 --- a/Projects/Foundations/TS/Bot-Modules/Indicator-Bot/Candles-Volumes/CandlesVolumesMultiTimeFrameMarket.js +++ b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/Candles-Volumes/CandlesVolumesMultiTimeFrameMarket.js @@ -1,4 +1,4 @@ -exports.newFoundationsBotModulesCandlesVolumesMultiTimeFrameMarket = function (processIndex) { +exports.newDataMiningBotModulesCandlesVolumesMultiTimeFrameMarket = function (processIndex) { const MODULE_NAME = "Candles Volumes Multi Time Frame Market" const CANDLES_FOLDER_NAME = "Candles" diff --git a/Projects/Foundations/TS/Bot-Modules/Indicator-Bot/FromOneMinToMultiTimeFrameDaily.js b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/FromOneMinToMultiTimeFrameDaily.js similarity index 99% rename from Projects/Foundations/TS/Bot-Modules/Indicator-Bot/FromOneMinToMultiTimeFrameDaily.js rename to Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/FromOneMinToMultiTimeFrameDaily.js index 93c384207a..8ca4f8a827 100644 --- a/Projects/Foundations/TS/Bot-Modules/Indicator-Bot/FromOneMinToMultiTimeFrameDaily.js +++ b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/FromOneMinToMultiTimeFrameDaily.js @@ -1,4 +1,4 @@ -exports.newFoundationsBotModulesFromOneMinToMultiTimeFrameDaily = function (processIndex) { +exports.newDataMiningBotModulesFromOneMinToMultiTimeFrameDaily = function (processIndex) { /* This module is about converting a One-Min Daily typeo of data set into a Multi Time Frame Daily type. diff --git a/Projects/Foundations/TS/Bot-Modules/Indicator-Bot/FromOneMinToMultiTimeFrameMarket.js b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/FromOneMinToMultiTimeFrameMarket.js similarity index 99% rename from Projects/Foundations/TS/Bot-Modules/Indicator-Bot/FromOneMinToMultiTimeFrameMarket.js rename to Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/FromOneMinToMultiTimeFrameMarket.js index 6d943ed835..6c07fa35f6 100644 --- a/Projects/Foundations/TS/Bot-Modules/Indicator-Bot/FromOneMinToMultiTimeFrameMarket.js +++ b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/FromOneMinToMultiTimeFrameMarket.js @@ -1,4 +1,4 @@ -exports.newFoundationsBotModulesFromOneMinToMultiTimeFrameMarket = function (processIndex) { +exports.newDataMiningBotModulesFromOneMinToMultiTimeFrameMarket = function (processIndex) { /* This module is about converting a One-Min Daily typeo of data set into a Multi Time Frame Market type. diff --git a/Projects/Foundations/TS/Bot-Modules/Indicator-Bot/IndicatorOutput.js b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/IndicatorOutput.js similarity index 99% rename from Projects/Foundations/TS/Bot-Modules/Indicator-Bot/IndicatorOutput.js rename to Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/IndicatorOutput.js index f6f23ce0c2..68129a3ffd 100644 --- a/Projects/Foundations/TS/Bot-Modules/Indicator-Bot/IndicatorOutput.js +++ b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/IndicatorOutput.js @@ -1,4 +1,4 @@ -exports.newFoundationsBotModulesIndicatorOutput = function (processIndex) { +exports.newDataMiningBotModulesIndicatorOutput = function (processIndex) { /* This module coordinates the actions to be taken to generate an indicator output. It is used from both Multi-Time-Frame-Market and Multi-Time-Frame-Daily frameworks. diff --git a/Projects/Foundations/TS/Bot-Modules/Indicator-Bot/MultiTimeFrameDaily.js b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/MultiTimeFrameDaily.js similarity index 99% rename from Projects/Foundations/TS/Bot-Modules/Indicator-Bot/MultiTimeFrameDaily.js rename to Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/MultiTimeFrameDaily.js index d4815fe6b1..5889149032 100644 --- a/Projects/Foundations/TS/Bot-Modules/Indicator-Bot/MultiTimeFrameDaily.js +++ b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/MultiTimeFrameDaily.js @@ -1,4 +1,4 @@ -exports.newFoundationsBotModulesMultiTimeFrameDaily = function (processIndex) { +exports.newDataMiningBotModulesMultiTimeFrameDaily = function (processIndex) { const MODULE_NAME = "Multi Time Frame Daily" /* This module deals with Daily Files, that are data files for Time Frames below 1 hour. @@ -25,7 +25,7 @@ statusDependenciesModule = pStatusDependencies; dataDependenciesModule = pStatusDependenciesModule; - indicatorOutputModule = TS.projects.foundations.botModules.indicatorOutput.newFoundationsBotModulesIndicatorOutput(processIndex) + indicatorOutputModule = TS.projects.foundations.botModules.indicatorOutput.newDataMiningBotModulesIndicatorOutput(processIndex) indicatorOutputModule.initialize(callBackFunction) } diff --git a/Projects/Foundations/TS/Bot-Modules/Indicator-Bot/MultiTimeFrameMarket.js b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/MultiTimeFrameMarket.js similarity index 98% rename from Projects/Foundations/TS/Bot-Modules/Indicator-Bot/MultiTimeFrameMarket.js rename to Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/MultiTimeFrameMarket.js index 739a7dc5dc..bc01d3b6a0 100644 --- a/Projects/Foundations/TS/Bot-Modules/Indicator-Bot/MultiTimeFrameMarket.js +++ b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/MultiTimeFrameMarket.js @@ -1,4 +1,4 @@ -exports.newFoundationsBotModulesMultiTimeFrameMarket = function (processIndex) { +exports.newDataMiningBotModulesMultiTimeFrameMarket = function (processIndex) { const MODULE_NAME = "Multi Time Frame Market" /* This module deals with Market Files, that are data files for Time Frames of 1 hour and above. @@ -24,7 +24,7 @@ statusDependenciesModule = pStatusDependencies dataDependenciesModule = pStatusDependenciesModule - indicatorOutputModule = TS.projects.foundations.botModules.indicatorOutput.newFoundationsBotModulesIndicatorOutput(processIndex) + indicatorOutputModule = TS.projects.foundations.botModules.indicatorOutput.newDataMiningBotModulesIndicatorOutput(processIndex) indicatorOutputModule.initialize(callBackFunction) } diff --git a/Projects/Foundations/TS/Bot-Modules/Indicator-Bot/SingleMarketIndicatorBot.js b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/SingleMarketIndicatorBot.js similarity index 99% rename from Projects/Foundations/TS/Bot-Modules/Indicator-Bot/SingleMarketIndicatorBot.js rename to Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/SingleMarketIndicatorBot.js index 85baf32046..d517c3c4ed 100644 --- a/Projects/Foundations/TS/Bot-Modules/Indicator-Bot/SingleMarketIndicatorBot.js +++ b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/SingleMarketIndicatorBot.js @@ -1,4 +1,4 @@ -exports.newFoundationsBotModulesSingleMarketIndicatorBot = function (processIndex) { +exports.newDataMiningBotModulesSingleMarketIndicatorBot = function (processIndex) { const MODULE_NAME = "Single Market Indicator Bot"; @@ -40,7 +40,8 @@ let botModuleDefinition = TS.projects.foundations.functionLibraries.taskFunctions.getBotModuleByName( TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.config.botModule ) - let project = TS.projects[TS.projects.foundations.globals.taskConstants.PROJECT_DEFINITION_NODE.config.codeName.toLowerCase()] + let projectCodeName = TS.projects.foundations.globals.taskConstants.PROJECT_DEFINITION_NODE.config.codeName + let project = TS.projects[PROJECTS_SCHEMA_MAP.get(projectCodeName).propertyName] let botModule = project.botModules[botModuleDefinition.propertyName] let moduleFunction = botModule[botModuleDefinition.functionName] botModuleObject = moduleFunction(processIndex) @@ -276,22 +277,22 @@ switch (TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.config.framework.name) { case 'Multi-Time-Frame-Market': { - processFramework = TS.projects.foundations.botModules.multiTimeFrameMarket.newFoundationsBotModulesMultiTimeFrameMarket(processIndex) + processFramework = TS.projects.foundations.botModules.multiTimeFrameMarket.newDataMiningBotModulesMultiTimeFrameMarket(processIndex) intitializeProcessFramework() break; } case 'Multi-Time-Frame-Daily': { - processFramework = TS.projects.foundations.botModules.multiTimeFrameDaily.newFoundationsBotModulesMultiTimeFrameDaily(processIndex) + processFramework = TS.projects.foundations.botModules.multiTimeFrameDaily.newDataMiningBotModulesMultiTimeFrameDaily(processIndex) intitializeProcessFramework() break; } case 'From-One-Min-To-Multi-Time-Frame-Market': { - processFramework = TS.projects.foundations.botModules.fromOneMinToMultiTimeFrameMarket.newFoundationsBotModulesFromOneMinToMultiTimeFrameMarket(processIndex) + processFramework = TS.projects.foundations.botModules.fromOneMinToMultiTimeFrameMarket.newDataMiningBotModulesFromOneMinToMultiTimeFrameMarket(processIndex) intitializeProcessFramework() break; } case 'From-One-Min-To-Multi-Time-Frame-Daily': { - processFramework = TS.projects.foundations.botModules.fromOneMinToMultiTimeFrameDaily.newFoundationsBotModulesFromOneMinToMultiTimeFrameDaily(processIndex) + processFramework = TS.projects.foundations.botModules.fromOneMinToMultiTimeFrameDaily.newDataMiningBotModulesFromOneMinToMultiTimeFrameDaily(processIndex) intitializeProcessFramework() break; } diff --git a/Projects/Foundations/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/HistoricOHLCVs.js b/Projects/Data-Mining/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/HistoricOHLCVs.js similarity index 99% rename from Projects/Foundations/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/HistoricOHLCVs.js rename to Projects/Data-Mining/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/HistoricOHLCVs.js index 34cbb378ed..ca299e3505 100644 --- a/Projects/Foundations/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/HistoricOHLCVs.js +++ b/Projects/Data-Mining/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/HistoricOHLCVs.js @@ -1,4 +1,4 @@ -exports.newFoundationsBotModulesHistoricOHLCVs = function (processIndex) { +exports.newDataMiningBotModulesHistoricOHLCVs = function (processIndex) { const MODULE_NAME = "Historic OHLCVs"; const CANDLES_FOLDER_NAME = "Candles/One-Min"; diff --git a/Projects/Foundations/TS/Bot-Modules/Sensor-Bot/SingleMarketSensorBot.js b/Projects/Data-Mining/TS/Bot-Modules/Sensor-Bot/SingleMarketSensorBot.js similarity index 99% rename from Projects/Foundations/TS/Bot-Modules/Sensor-Bot/SingleMarketSensorBot.js rename to Projects/Data-Mining/TS/Bot-Modules/Sensor-Bot/SingleMarketSensorBot.js index 479524f045..32b7e8c167 100644 --- a/Projects/Foundations/TS/Bot-Modules/Sensor-Bot/SingleMarketSensorBot.js +++ b/Projects/Data-Mining/TS/Bot-Modules/Sensor-Bot/SingleMarketSensorBot.js @@ -1,4 +1,4 @@ -exports.newFoundationsBotModulesSingleMarketSensorBot = function (processIndex) { +exports.newDataMiningBotModulesSingleMarketSensorBot = function (processIndex) { const MODULE_NAME = "Single Market Sensor Bot"; @@ -41,7 +41,8 @@ let botModuleDefinition = TS.projects.foundations.functionLibraries.taskFunctions.getBotModuleByName( TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.config.botModule ) - let project = TS.projects[TS.projects.foundations.globals.taskConstants.PROJECT_DEFINITION_NODE.config.codeName.toLowerCase()] + let projectCodeName = TS.projects.foundations.globals.taskConstants.PROJECT_DEFINITION_NODE.config.codeName + let project = TS.projects[PROJECTS_SCHEMA_MAP.get(projectCodeName).propertyName] let botModule = project.botModules[botModuleDefinition.propertyName] let moduleFunction = botModule[botModuleDefinition.functionName] botModuleObject = moduleFunction(processIndex) diff --git a/Projects/Foundations/TS/Bot-Modules/Sensor-Bot/Webhooks/CheckWebhook.js b/Projects/Data-Mining/TS/Bot-Modules/Sensor-Bot/Webhooks/CheckWebhook.js similarity index 99% rename from Projects/Foundations/TS/Bot-Modules/Sensor-Bot/Webhooks/CheckWebhook.js rename to Projects/Data-Mining/TS/Bot-Modules/Sensor-Bot/Webhooks/CheckWebhook.js index 23d8753c40..ff45cd70d4 100644 --- a/Projects/Foundations/TS/Bot-Modules/Sensor-Bot/Webhooks/CheckWebhook.js +++ b/Projects/Data-Mining/TS/Bot-Modules/Sensor-Bot/Webhooks/CheckWebhook.js @@ -1,5 +1,5 @@  -exports.newFoundationsBotModulesCheckWebhook = function (processIndex) { +exports.newDataMiningBotModulesCheckWebhook = function (processIndex) { const MODULE_NAME = "Check Webhooks"; const FOLDER_NAME = "External-Signals"; diff --git a/Projects/Foundations/Schemas/Docs-Topics/D/Data/Data-Mining/data-mining-005-data-mining-indicator-frameworks.json b/Projects/Foundations/Schemas/Docs-Topics/D/Data/Data-Mining/data-mining-005-data-mining-indicator-frameworks.json index 53840f9735..24323fa1af 100644 --- a/Projects/Foundations/Schemas/Docs-Topics/D/Data/Data-Mining/data-mining-005-data-mining-indicator-frameworks.json +++ b/Projects/Foundations/Schemas/Docs-Topics/D/Data/Data-Mining/data-mining-005-data-mining-indicator-frameworks.json @@ -90,7 +90,7 @@ }, { "style": "Json", - "text": "\"botModules\": [\n {\n \"name\": \"Candles Volumes Multi Time Frame Market\",\n \"propertyName\": \"candlesVolumesMultiTimeFrameMarket\",\n \"functionName\": \"newFoundationsBotModulesCandlesVolumesMultiTimeFrameMarket\",\n \"fileName\": \"CandlesVolumesMultiTimeFrameMarket.js\",\n \"folderName\": \"Indicator-Bot/Candles-Volumes\"\n },", + "text": "\"botModules\": [\n {\n \"name\": \"Candles Volumes Multi Time Frame Market\",\n \"propertyName\": \"candlesVolumesMultiTimeFrameMarket\",\n \"functionName\": \"newDataMiningBotModulesCandlesVolumesMultiTimeFrameMarket\",\n \"fileName\": \"CandlesVolumesMultiTimeFrameMarket.js\",\n \"folderName\": \"Indicator-Bot/Candles-Volumes\"\n },", "updated": 1621703869144 }, { diff --git a/Projects/ProjectsSchema.json b/Projects/ProjectsSchema.json index f641ff6b29..9982a1af84 100644 --- a/Projects/ProjectsSchema.json +++ b/Projects/ProjectsSchema.json @@ -519,114 +519,6 @@ } ], "botModules": [ - { - "name": "Single Market Sensor Bot", - "propertyName": "singleMarketSensorBot", - "functionName": "newFoundationsBotModulesSingleMarketSensorBot", - "fileName": "SingleMarketSensorBot.js", - "folderName": "Sensor-Bot", - "botType": "Sensor Bot" - }, - { - "name": "Exchange Raw Data Historic OHLCVs", - "propertyName": "historicOHLCVs", - "functionName": "newFoundationsBotModulesHistoricOHLCVs", - "fileName": "HistoricOHLCVs.js", - "folderName": "Sensor-Bot/Exchange-Raw-Data" - }, - { - "name": "Webhooks Check Webhook", - "propertyName": "checkWebhook", - "functionName": "newFoundationsBotModulesCheckWebhook", - "fileName": "CheckWebhook.js", - "folderName": "Sensor-Bot/Webhooks" - }, - { - "name": "Single Market API Data Fetcher Bot", - "propertyName": "singleMarketAPIDataFetcherBot", - "functionName": "newFoundationsBotModulesSingleMarketAPIDataFetcherBot", - "fileName": "SingleMarketAPIDataFetcherBot.js", - "folderName": "API-Data-Fetcher-Bot", - "botType": "API Data Fetcher Bot" - }, - { - "name": "API Data Fetcher Fetching Process", - "propertyName": "fetchingProcess", - "functionName": "newFoundationsBotModulesFetchingProcess", - "fileName": "FetchingProcess.js", - "folderName": "API-Data-Fetcher-Bot" - }, - { - "name": "Single Market Indicator Bot", - "propertyName": "singleMarketIndicatorBot", - "functionName": "newFoundationsBotModulesSingleMarketIndicatorBot", - "fileName": "SingleMarketIndicatorBot.js", - "folderName": "Indicator-Bot", - "botType": "Indicator Bot" - }, - { - "name": "Candles Volumes Multi Time Frame Daily", - "propertyName": "candlesVolumesMultiTimeFrameDaily", - "functionName": "newFoundationsBotModulesCandlesVolumesMultiTimeFrameDaily", - "fileName": "CandlesVolumesMultiTimeFrameDaily.js", - "folderName": "Indicator-Bot/Candles-Volumes" - }, - { - "name": "Candles Volumes Multi Time Frame Market", - "propertyName": "candlesVolumesMultiTimeFrameMarket", - "functionName": "newFoundationsBotModulesCandlesVolumesMultiTimeFrameMarket", - "fileName": "CandlesVolumesMultiTimeFrameMarket.js", - "folderName": "Indicator-Bot/Candles-Volumes" - }, - { - "name": "Bollinger Bands Multi Time Frame Daily", - "propertyName": "bollingerBandsMultiTimeFrameDaily", - "functionName": "newFoundationsBotModulesBollingerBandsMultiTimeFrameDaily", - "fileName": "BollingerBandsMultiTimeFrameDaily.js", - "folderName": "Indicator-Bot/Bollinger-Bands" - }, - { - "name": "Bollinger Bands Multi Time Frame Market", - "propertyName": "bollingerBandsMultiTimeFrameMarket", - "functionName": "newFoundationsBotModulesBollingerBandsMultiTimeFrameMarket", - "fileName": "BollingerBandsMultiTimeFrameMarket.js", - "folderName": "Indicator-Bot/Bollinger-Bands" - }, - { - "name": "Multi Time Frame Market", - "propertyName": "multiTimeFrameMarket", - "functionName": "newFoundationsBotModulesMultiTimeFrameMarket", - "fileName": "MultiTimeFrameMarket.js", - "folderName": "Indicator-Bot" - }, - { - "name": "Multi Time Frame Daily", - "propertyName": "multiTimeFrameDaily", - "functionName": "newFoundationsBotModulesMultiTimeFrameDaily", - "fileName": "MultiTimeFrameDaily.js", - "folderName": "Indicator-Bot" - }, - { - "name": "From One Min To Multi Time Frame Market", - "propertyName": "fromOneMinToMultiTimeFrameMarket", - "functionName": "newFoundationsBotModulesFromOneMinToMultiTimeFrameMarket", - "fileName": "FromOneMinToMultiTimeFrameMarket.js", - "folderName": "Indicator-Bot" - }, - { - "name": "From One Min To Multi Time Frame Daily", - "propertyName": "fromOneMinToMultiTimeFrameDaily", - "functionName": "newFoundationsBotModulesFromOneMinToMultiTimeFrameDaily", - "fileName": "FromOneMinToMultiTimeFrameDaily.js", - "folderName": "Indicator-Bot" - }, - { - "name": "Indicator Output", - "propertyName": "indicatorOutput", - "functionName": "newFoundationsBotModulesIndicatorOutput", - "fileName": "IndicatorOutput.js", - "folderName": "Indicator-Bot" - }, { "name": "Single Market Trading Bot", "propertyName": "singleMarketTradingBot", @@ -937,7 +829,118 @@ } ] }, - "TS": {} + "TS": { + "botModules":[ + { + "name": "Single Market Sensor Bot", + "propertyName": "singleMarketSensorBot", + "functionName": "newDataMiningBotModulesSingleMarketSensorBot", + "fileName": "SingleMarketSensorBot.js", + "folderName": "Sensor-Bot", + "botType": "Sensor Bot" + }, + { + "name": "Exchange Raw Data Historic OHLCVs", + "propertyName": "historicOHLCVs", + "functionName": "newDataMiningBotModulesHistoricOHLCVs", + "fileName": "HistoricOHLCVs.js", + "folderName": "Sensor-Bot/Exchange-Raw-Data" + }, + { + "name": "Single Market API Data Fetcher Bot", + "propertyName": "singleMarketAPIDataFetcherBot", + "functionName": "newDataMiningBotModulesSingleMarketAPIDataFetcherBot", + "fileName": "SingleMarketAPIDataFetcherBot.js", + "folderName": "API-Data-Fetcher-Bot", + "botType": "API Data Fetcher Bot" + }, + { + "name": "API Data Fetcher Fetching Process", + "propertyName": "fetchingProcess", + "functionName": "newDataMiningBotModulesFetchingProcess", + "fileName": "FetchingProcess.js", + "folderName": "API-Data-Fetcher-Bot" + }, + { + "name": "Single Market Indicator Bot", + "propertyName": "singleMarketIndicatorBot", + "functionName": "newDataMiningBotModulesSingleMarketIndicatorBot", + "fileName": "SingleMarketIndicatorBot.js", + "folderName": "Indicator-Bot", + "botType": "Indicator Bot" + }, + { + "name": "Candles Volumes Multi Time Frame Daily", + "propertyName": "candlesVolumesMultiTimeFrameDaily", + "functionName": "newDataMiningBotModulesCandlesVolumesMultiTimeFrameDaily", + "fileName": "CandlesVolumesMultiTimeFrameDaily.js", + "folderName": "Indicator-Bot/Candles-Volumes" + }, + { + "name": "Candles Volumes Multi Time Frame Market", + "propertyName": "candlesVolumesMultiTimeFrameMarket", + "functionName": "newDataMiningBotModulesCandlesVolumesMultiTimeFrameMarket", + "fileName": "CandlesVolumesMultiTimeFrameMarket.js", + "folderName": "Indicator-Bot/Candles-Volumes" + }, + { + "name": "Bollinger Bands Multi Time Frame Daily", + "propertyName": "bollingerBandsMultiTimeFrameDaily", + "functionName": "newDataMiningBotModulesBollingerBandsMultiTimeFrameDaily", + "fileName": "BollingerBandsMultiTimeFrameDaily.js", + "folderName": "Indicator-Bot/Bollinger-Bands" + }, + { + "name": "Bollinger Bands Multi Time Frame Market", + "propertyName": "bollingerBandsMultiTimeFrameMarket", + "functionName": "newDataMiningBotModulesBollingerBandsMultiTimeFrameMarket", + "fileName": "BollingerBandsMultiTimeFrameMarket.js", + "folderName": "Indicator-Bot/Bollinger-Bands" + }, + { + "name": "Multi Time Frame Market", + "propertyName": "multiTimeFrameMarket", + "functionName": "newDataMiningBotModulesMultiTimeFrameMarket", + "fileName": "MultiTimeFrameMarket.js", + "folderName": "Indicator-Bot" + }, + { + "name": "Multi Time Frame Daily", + "propertyName": "multiTimeFrameDaily", + "functionName": "newDataMiningBotModulesMultiTimeFrameDaily", + "fileName": "MultiTimeFrameDaily.js", + "folderName": "Indicator-Bot" + }, + { + "name": "From One Min To Multi Time Frame Market", + "propertyName": "fromOneMinToMultiTimeFrameMarket", + "functionName": "newDataMiningBotModulesFromOneMinToMultiTimeFrameMarket", + "fileName": "FromOneMinToMultiTimeFrameMarket.js", + "folderName": "Indicator-Bot" + }, + { + "name": "From One Min To Multi Time Frame Daily", + "propertyName": "fromOneMinToMultiTimeFrameDaily", + "functionName": "newDataMiningBotModulesFromOneMinToMultiTimeFrameDaily", + "fileName": "FromOneMinToMultiTimeFrameDaily.js", + "folderName": "Indicator-Bot" + }, + { + "name": "Indicator Output", + "propertyName": "indicatorOutput", + "functionName": "newDataMiningBotModulesIndicatorOutput", + "fileName": "IndicatorOutput.js", + "folderName": "Indicator-Bot" + }, + { + "name": "Webhooks Check Webhook", + "propertyName": "checkWebhook", + "functionName": "newDataMiningBotModulesCheckWebhook", + "fileName": "CheckWebhook.js", + "folderName": "Sensor-Bot/Webhooks" + } + ] + } }, { "name": "Ethereum", diff --git a/TaskServer/ProcessInstance.js b/TaskServer/ProcessInstance.js index baed019318..769906ab55 100644 --- a/TaskServer/ProcessInstance.js +++ b/TaskServer/ProcessInstance.js @@ -53,14 +53,14 @@ defined with the same type at the property botType. */ for (let i = 0; i < PROJECTS_SCHEMA.length; i++) { - let project = PROJECTS_SCHEMA[i] - if (project.name !== TS.projects.foundations.globals.taskConstants.PROJECT_DEFINITION_NODE.config.codeName) { continue } - for (let j = 0; j < project.TS.botModules.length; j++) { - botModuleDefinition = project.TS.botModules[j] + let projectDefinition = PROJECTS_SCHEMA[i] + if (projectDefinition.name !== TS.projects.foundations.globals.taskConstants.PROJECT_DEFINITION_NODE.config.codeName) { continue } + for (let j = 0; j < projectDefinition.TS.botModules.length; j++) { + botModuleDefinition = projectDefinition.TS.botModules[j] if (botModuleDefinition.botType === TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.parentNode.type) { try { TS.projects.foundations.globals.processVariables.TOTAL_PROCESS_INSTANCES_CREATED++ - let project = TS.projects[TS.projects.foundations.globals.taskConstants.PROJECT_DEFINITION_NODE.config.codeName.toLowerCase()] + let project = TS.projects[projectDefinition.propertyName] let botModule = project.botModules[botModuleDefinition.propertyName] let moduleFunction = botModule[botModuleDefinition.functionName] botModuleObject = moduleFunction(processIndex) diff --git a/TaskServerRoot.js b/TaskServerRoot.js index 65f5a7d235..39811c6713 100644 --- a/TaskServerRoot.js +++ b/TaskServerRoot.js @@ -23,6 +23,12 @@ global.env = ENVIRONMENT_MODULE First thing is to load the project schema file. */ global.PROJECTS_SCHEMA = require(global.env.PATH_TO_PROJECT_SCHEMA) +global.PROJECTS_SCHEMA_MAP = new Map() + +for (let i = 0; i < PROJECTS_SCHEMA.length; i++) { + let projectDefinition = PROJECTS_SCHEMA[i] + PROJECTS_SCHEMA_MAP.set(projectDefinition.name, projectDefinition) +} /* Setting up the modules that will be available, defined at the Project Schema file. */