, logger
This commit is contained in:
1 parent
12b8abb1f3
commit
8ecb9152bf
39 files changed
+85
-85
No files matched your search
@@ -1,4 +1,4 @@
|
||||
exports.newTradingProcess = function (processIndex, logger, UTILITIES) {
|
||||
exports.newTradingProcess = function (processIndex, UTILITIES) {
|
||||
/*
|
||||
This Module will load all the process data dependencies from files and send them downstream.
|
||||
After execution, will save the time range and status report of the process.
|
||||
@@ -24,10 +24,10 @@
|
||||
let fileStorage = FILE_STORAGE.newFileStorage(logger);
|
||||
|
||||
const TRADING_ENGINE_MODULE = require('./TradingEngine.js')
|
||||
let tradingEngineModule = TRADING_ENGINE_MODULE.newTradingEngine(processIndex, logger)
|
||||
let tradingEngineModule = TRADING_ENGINE_MODULE.newTradingEngine(processIndex)
|
||||
|
||||
let TRADING_OUTPUT_MODULE = require("./TradingOutput")
|
||||
let tradingOutputModule = TRADING_OUTPUT_MODULE.newTradingOutput(processIndex, logger, tradingEngineModule, UTILITIES, FILE_STORAGE)
|
||||
let tradingOutputModule = TRADING_OUTPUT_MODULE.newTradingOutput(processIndex, tradingEngineModule, UTILITIES, FILE_STORAGE)
|
||||
|
||||
let processConfig;
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
await processSingleFiles()
|
||||
|
||||
if (await processMarketFiles() === false) {
|
||||
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, logger, undefined, undefined, 'Waiting for Data Mining to be run')
|
||||
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
|
||||
}
|
||||
@@ -141,17 +141,17 @@
|
||||
With all the indicators data files loaded, we will build the chart object
|
||||
data structure that will be used in user-defied conditions and formulas.
|
||||
*/
|
||||
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, logger, undefined, undefined, 'Waking up')
|
||||
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, undefined, undefined, 'Waking up')
|
||||
buildCharts(chart)
|
||||
|
||||
if (checkThereAreCandles(chart) === true) {
|
||||
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, logger, undefined, undefined, 'Running')
|
||||
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, undefined, undefined, 'Running')
|
||||
await generateOutput(chart)
|
||||
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, logger, undefined, undefined, 'Saving')
|
||||
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, undefined, undefined, 'Saving')
|
||||
await writeProcessFiles()
|
||||
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, logger, undefined, undefined, 'Sleeping')
|
||||
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, undefined, undefined, 'Sleeping')
|
||||
} else {
|
||||
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, logger, 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 at.')
|
||||
callBackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_RETRY_RESPONSE)
|
||||
return
|
||||
}
|
||||
@@ -171,9 +171,9 @@
|
||||
if (checkStopTaskGracefully() === false) { break }
|
||||
if (checkStopProcessing() === false) { break }
|
||||
|
||||
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, logger, undefined, undefined, 'Waking up')
|
||||
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, undefined, undefined, 'Waking up')
|
||||
if (await processDailyFiles() === false) {
|
||||
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, logger, undefined, undefined, 'Waiting for Data Mining to be run')
|
||||
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
|
||||
}
|
||||
@@ -186,13 +186,13 @@
|
||||
The process of generating the output includes the trading simulation.
|
||||
*/
|
||||
if (checkThereAreCandles(chart) === true) {
|
||||
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, logger, undefined, undefined, 'Running')
|
||||
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, undefined, undefined, 'Running')
|
||||
await generateOutput(chart)
|
||||
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, logger, undefined, undefined, 'Saving')
|
||||
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, undefined, undefined, 'Saving')
|
||||
await writeProcessFiles()
|
||||
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, logger, undefined, undefined, 'Sleeping')
|
||||
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, undefined, undefined, 'Sleeping')
|
||||
} else {
|
||||
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, logger, undefined, undefined, 'Waiting for Data Mining to be up to date')
|
||||
TS.projects.superalgos.functionLibraries.sessionFunctions.sessionHeartBeat(processIndex, undefined, undefined, 'Waiting for Data Mining to be up to date')
|
||||
callBackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_RETRY_RESPONSE)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user