Merge pull request #393 from Luis-Fernando-Molina/develop
Contribution: Bug Fixed: Data Dependencies Filter wrongly considering nodes like Conditions with draft code.
This commit is contained in:
6 files changed
+51
-6
No files matched your search
+28
-1
@@ -101,7 +101,12 @@
|
||||
Here is the point where we sync one and the other.
|
||||
*/
|
||||
let tradingProcessDate = TS.projects.superalgos.utilities.dateTimeFunctions.removeTime(TS.projects.superalgos.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).SIMULATION_STATE.tradingEngine.current.episode.processDate.value)
|
||||
await processSingleFiles()
|
||||
|
||||
if (await processSingleFiles() === false) {
|
||||
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, undefined, undefined, 'Waiting for Data Mining to be run')
|
||||
callBackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_RETRY_RESPONSE)
|
||||
return
|
||||
}
|
||||
|
||||
if (await processMarketFiles() === false) {
|
||||
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, undefined, undefined, 'Waiting for Data Mining to be run')
|
||||
@@ -343,6 +348,16 @@
|
||||
/* We cut the async calls via callBacks at this point, so as to have a clearer code upstream */
|
||||
let response = await asyncGetDatasetFile(datasetModule, filePath, fileName)
|
||||
|
||||
if (response.err.message === 'File does not exist.') {
|
||||
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[ERROR] File not Found. This process will wait until you run your Data Mining and this file is created. File = " + filePath + '/' + fileName)
|
||||
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[ERROR] Your strategy depends on the dataset " + dependency.name + '.')
|
||||
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[ERROR] The reason that it depends on this dataset is becuase in one of your condition's Javascript Code node, you have written an expression that references this dataset. If you don't want to depend on this dataset, just locate that code and remove the mention.")
|
||||
return false
|
||||
}
|
||||
|
||||
if (response.err.result !== TS.projects.superalgos.globals.standardResponses.DEFAULT_OK_RESPONSE.result) {
|
||||
throw (response.err)
|
||||
}
|
||||
@@ -393,6 +408,12 @@
|
||||
let response = await asyncGetDatasetFile(datasetModule, filePath, fileName)
|
||||
|
||||
if (response.err.message === 'File does not exist.') {
|
||||
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[ERROR] File not Found. This process will wait until you run your Data Mining and this file is created. File = " + filePath + '/' + fileName)
|
||||
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[ERROR] Your strategy depends on the dataset " + dependency.name + '.')
|
||||
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[ERROR] The reason that it depends on this dataset is becuase in one of your condition's Javascript Code node, you have written an expression that references this dataset. If you don't want to depend on this dataset, just locate that code and remove the mention.")
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -516,6 +537,12 @@
|
||||
let response = await asyncGetDatasetFile(datasetModule, filePath, fileName)
|
||||
|
||||
if (response.err.message === 'File does not exist.') {
|
||||
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[ERROR] File not Found. This process will wait until you run your Data Mining and this file is created. File = " + filePath + '/' + fileName)
|
||||
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[ERROR] Your strategy depends on the dataset " + dependency.name + '.')
|
||||
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[ERROR] The reason that it depends on this dataset is becuase in one of your condition's Javascript Code node, you have written an expression that references this dataset. If you don't want to depend on this dataset, just locate that code and remove the mention.")
|
||||
return false
|
||||
}
|
||||
if (response.err.result !== TS.projects.superalgos.globals.standardResponses.DEFAULT_OK_RESPONSE.result) {
|
||||
|
||||
@@ -13,7 +13,7 @@ exports.newSuperalgosGlobalsProcessConstants = function () {
|
||||
TRADING_SYSTEM_NODE This is a Trading System node structure.
|
||||
TRADING_ENGINE_NODE This is a Trading Engine node structure.
|
||||
SESSION_NODE This is a Trading Session node structure.
|
||||
DEPENDENCY_FILTER This is the counter of main loops for a bot process.
|
||||
DEPENDENCY_FILTER This is an array that defines which indicators and at which time frame are dependencies for a process.
|
||||
*/
|
||||
return thisObject
|
||||
}
|
||||
@@ -18,10 +18,13 @@
|
||||
try {
|
||||
/* Basic Valdidations */
|
||||
if (TS.projects.superalgos.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processDependencies !== undefined) {
|
||||
/*
|
||||
First we will get all the data dependencies of the bot, as defined at the Trading Mine.
|
||||
*/
|
||||
thisObject.nodeArray = TS.projects.superalgos.utilities.nodeFunctions.nodeBranchToArray(TS.projects.superalgos.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processDependencies, 'Data Dependency')
|
||||
if (thisObject.nodeArray.length === 0) {
|
||||
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME, "[ERROR] initialize -> onInitilized -> It is not possible to not have data dependencies at all.");
|
||||
callBackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_OK_RESPONSE)
|
||||
callBackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_FAIL_RESPONSE)
|
||||
return
|
||||
}
|
||||
/*
|
||||
|
||||
@@ -170,7 +170,7 @@ exports.newSuperalgosTaskModulesDebugLog = function (processIndex) {
|
||||
let logLine = '\r\n' + message;
|
||||
|
||||
if (message.indexOf("ERROR") > 0) {
|
||||
let key = TS.projects.superalgos.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.parentNode.parentNode.config.codeName + '-' + TS.projects.superalgos.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.parentNode.config + '-' + TS.projects.superalgos.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.config.codeName
|
||||
let key = TS.projects.superalgos.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.parentNode.parentNode.config.codeName + '-' + TS.projects.superalgos.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.parentNode.config.codeName + '-' + TS.projects.superalgos.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.config.codeName
|
||||
console.log('*********** ' + message + ' @ ' + key)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
function newSuperalgosFunctionLibraryDependenciesFilter() {
|
||||
/*
|
||||
The function will scen a node branch, most likely a Trading System,
|
||||
looking into the code property of each node. It will analyze it's
|
||||
content and try to make a list of all indicators mentioned at the code
|
||||
text and at which time frames they are mentioned.
|
||||
|
||||
It is important to note that all node that are not of the type
|
||||
Javascript Code are going to be filtered out.
|
||||
*/
|
||||
thisObject = {
|
||||
createFilter: createFilter
|
||||
}
|
||||
@@ -12,7 +21,9 @@ function newSuperalgosFunctionLibraryDependenciesFilter() {
|
||||
return Array.from(filters.keys())
|
||||
|
||||
function recursiveFilter(node) {
|
||||
filter(node.code)
|
||||
if (node.type === 'Javascript Code') {
|
||||
filter(node.code)
|
||||
}
|
||||
|
||||
let schemaDocument = getSchemaDocument(node)
|
||||
if (schemaDocument !== undefined) {
|
||||
|
||||
@@ -1186,7 +1186,11 @@ function newSuperalgosTutorialSpace() {
|
||||
transformDocsInfoIntoTutorialInfo()
|
||||
createTheHTML()
|
||||
|
||||
if (nodeConfig.controlDocs !== undefined && nodeConfig.controlDocs.closeTutorialEditor !== true) {
|
||||
if (nodeConfig.controlDocs !== undefined ) {
|
||||
if ( nodeConfig.controlDocs.closeTutorialEditor !== true) {
|
||||
UI.projects.superalgos.spaces.docsSpace.navigateTo(nodeConfig.docs.project, 'Tutorial', nodeConfig.docs.type)
|
||||
}
|
||||
} else {
|
||||
UI.projects.superalgos.spaces.docsSpace.navigateTo(nodeConfig.docs.project, 'Tutorial', nodeConfig.docs.type)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user