Bug Fixed: When filters dont include Candles as Data Dependencies

This commit is contained in:
Luis Fernando Molina committed 2021-02-06 10:07:09 +01:00
1 parent 0d4a46dd44
commit 3cba3daad8
3 files changed
+11 -5

No files matched your search

@@ -136,7 +136,7 @@
await TS.projects.superalgos.functionLibraries.processFilesFunctions.writeProcessFiles(processIndex, contextVariables, currentTimeFrame, learningProcessDate, statusDependencies)
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, undefined, undefined, 'Sleeping')
} else {
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, undefined, undefined, 'Waiting for Data Mining to be up to date. No candles found at.')
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, undefined, undefined, 'Waiting for Data Mining to be up to date. No candles found.')
callBackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_RETRY_RESPONSE)
return
}
@@ -226,7 +226,7 @@
let propertyName = 'at' + sessionParameters.timeFrame.config.label.replace('-', '')
let candles = chart[propertyName].candles
if (candles.length === 0) {
if (candles === undefined || candles.length === 0) {
return false
} else {
return true
@@ -136,7 +136,7 @@
await TS.projects.superalgos.functionLibraries.processFilesFunctions.writeProcessFiles(processIndex, contextVariables, currentTimeFrame, tradingProcessDate, statusDependencies)
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, undefined, undefined, 'Sleeping')
} else {
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, undefined, undefined, 'Waiting for Data Mining to be up to date. No candles found at.')
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, undefined, undefined, 'Waiting for Data Mining to be up to date. No candles found.')
callBackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_RETRY_RESPONSE)
return
}
@@ -226,7 +226,7 @@
let propertyName = 'at' + sessionParameters.timeFrame.config.label.replace('-', '')
let candles = chart[propertyName].candles
if (candles.length === 0) {
if (candles === undefined || candles.length === 0) {
return false
} else {
return true
@@ -198,7 +198,13 @@
let product = dataDependency.referenceParent.parentNode.config.singularVariableName
if (thisObject.filters.exchange.products.get(exchange + '-' + market + '-' + product) !== true) {
continue
/*
We will filter out all the data dependencies which are not at the filters, except for candles,
because we will need the candles dataset to run the simulation.
*/
if (dataDependency.referenceParent.parentNode.config.codeName !== 'Candles') {
continue
}
}
addDataSet(exchange, market)
} else {