Indicators Fully Migrated

This commit is contained in:
Luis Fernando Molina committed 2020-12-02 17:17:29 +01:00
1 parent b58ac9017f
commit 2acb4648c3
4 files changed
+35 -24

No files matched your search

@@ -48,13 +48,13 @@
/* The first phase here is about checking that we have everything we need at the definition level. */
let dataDependencies = TS.projects.superalgos.utilities.nodeFunctions.nodeBranchToArray(TS.projects.superalgos.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processDependencies, 'Data Dependency')
if (TS.projects.superalgos.functionLibraries.singleMarketFunctions.validateDataDependencies(dataDependencies, callBackFunction) !== true) { return }
if (TS.projects.superalgos.functionLibraries.singleMarketFunctions.validateDataDependencies(processIndex, dataDependencies, callBackFunction) !== true) { return }
let outputDatasets = TS.projects.superalgos.utilities.nodeFunctions.nodeBranchToArray (TS.projects.superalgos.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset')
if (TS.projects.superalgos.functionLibraries.singleMarketFunctions.validateOutputDatasets(outputDatasets, callBackFunction) !== true) { return }
if (TS.projects.superalgos.functionLibraries.singleMarketFunctions.validateOutputDatasets(processIndex, outputDatasets, callBackFunction) !== true) { return }
/* The second phase is about transforming the inputs into a format that can be used to apply the user defined code. */
TS.projects.superalgos.functionLibraries.singleMarketFunctions.inflateDatafiles(dataFiles, dataDependencies, products, mainDependency, timeFrame)
TS.projects.superalgos.functionLibraries.singleMarketFunctions.inflateDatafiles(processIndex, dataFiles, dataDependencies, products, mainDependency, timeFrame)
/* During the third phase, we need to generate the data of the different products this process produces an output */
for (let i = 0; i < outputDatasets.length; i++) {
@@ -83,7 +83,7 @@
}
/* Build the data */
jsonData = TS.projects.superalgos.functionLibraries.singleMarketFunctions.dataBuildingProcedure(
jsonData = TS.projects.superalgos.functionLibraries.singleMarketFunctions.dataBuildingProcedure(processIndex,
products,
mainDependency,
recordDefinition,
@@ -100,7 +100,7 @@
/* Add the calculated properties */
if (outputDatasetNode.referenceParent.parentNode.calculations !== undefined) {
outputData = TS.projects.superalgos.functionLibraries.singleMarketFunctions.calculationsProcedure(jsonData, recordDefinition, outputDatasetNode.referenceParent.parentNode.calculations, singularVariableName, timeFrame)
outputData = TS.projects.superalgos.functionLibraries.singleMarketFunctions.calculationsProcedure(processIndex, jsonData, recordDefinition, outputDatasetNode.referenceParent.parentNode.calculations, singularVariableName, timeFrame)
} else {
outputData = jsonData
}
@@ -132,8 +132,8 @@
contextSummary.mineType = dataMineNode.type.replace(' ', '-')
contextSummary.project = dataMineNode.project
let fileContent = TS.projects.superalgos.functionLibraries.singleMarketFunctions.generateFileContent(outputData, outputDatasetNode.referenceParent.parentNode.record, resultsWithIrregularPeriods, processingDailyFiles, currentDay, callBackFunction)
TS.projects.superalgos.functionLibraries.singleMarketFunctions.writeFile(contextSummary, fileContent, anotherFileWritten, processingDailyFiles, timeFrameLabel, currentDay, callBackFunction)
let fileContent = TS.projects.superalgos.functionLibraries.singleMarketFunctions.generateFileContent(processIndex, outputData, outputDatasetNode.referenceParent.parentNode.record, resultsWithIrregularPeriods, processingDailyFiles, currentDay, callBackFunction)
TS.projects.superalgos.functionLibraries.singleMarketFunctions.writeFile(processIndex, contextSummary, fileContent, anotherFileWritten, processingDailyFiles, timeFrameLabel, currentDay, callBackFunction)
}