Trading Task Running

This commit is contained in:
Luis Fernando Molina committed 2021-09-27 18:29:29 +02:00
1 parent 67f6e1d9db
commit 7bada617b7
6 files changed
+21 -9

No files matched your search

@@ -285,7 +285,7 @@
*/
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
'[IMPORTANT] checkIfSessionMustStop -> Backtesting Session Finished. Stopping the Session now. ')
TS.projects.algorithmicTrading.functionLibraries.sessionFunctions.stopSession(processIndex, 'Backtesting Session Finished.')
TS.projects.foundations.functionLibraries.sessionFunctions.stopSession(processIndex, 'Backtesting Session Finished.')
}
}
}
@@ -89,7 +89,7 @@ exports.newAlgorithmicTradingBotModulesTradingSimulation = function (processInde
meaning that the dataSet needs to be updated with more up-to-date data.
*/
console.log('DEBUGGING ..................', initialCandle, candles.length)
TS.projects.algorithmicTrading.functionLibraries.sessionFunctions.stopSession(processIndex, 'Data is not up-to-date enough. Please start the Data Mining Operation.')
TS.projects.foundations.functionLibraries.sessionFunctions.stopSession(processIndex, 'Data is not up-to-date enough. Please start the Data Mining Operation.')
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
'[IMPORTANT] runSimulation -> Data is not up-to-date enough. Stopping the Session now. ')
return
@@ -253,7 +253,7 @@ exports.newAlgorithmicTradingBotModulesTradingSimulation = function (processInde
if (checkFinalDatetime() === false) {
closeEpisode('Final Datetime Reached')
breakLoop = true
TS.projects.algorithmicTrading.functionLibraries.sessionFunctions.stopSession(processIndex, 'Final Datetime Reached')
TS.projects.foundations.functionLibraries.sessionFunctions.stopSession(processIndex, 'Final Datetime Reached')
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
'[IMPORTANT] runSimulation -> Final Datetime Reached. Stopping the Session now. ')
return
@@ -262,7 +262,7 @@ exports.newAlgorithmicTradingBotModulesTradingSimulation = function (processInde
if (checkMinimunAndMaximunBalance() === false) {
closeEpisode('Min or Max Balance Reached')
breakLoop = true
TS.projects.algorithmicTrading.functionLibraries.sessionFunctions.stopSession(processIndex, 'Min or Max Balance Reached')
TS.projects.foundations.functionLibraries.sessionFunctions.stopSession(processIndex, 'Min or Max Balance Reached')
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
'[IMPORTANT] runSimulation -> Min or Max Balance Reached. Stopping the Session now. ')
return
@@ -24,7 +24,7 @@ exports.newAlgorithmicTradingBotModulesTradingStages = function (processIndex) {
let tradingStrategyModuleObject = TS.projects.algorithmicTrading.botModules.tradingStrategy.newAlgorithmicTradingBotModulesTradingStrategy(processIndex)
let tradingPositionModuleObject = TS.projects.algorithmicTrading.botModules.tradingPosition.newAlgorithmicTradingBotModulesTradingPosition(processIndex)
let tradingExecutionModuleObject = TS.projects.algorithmicTrading.botModules.tradingExecution.newAlgorithmicTradingBotModulesTradingExecution(processIndex)
let announcementsModuleObject = TS.projects.algorithmicTrading.botModules.announcements.newFoundationsBotModulesAnnouncements(processIndex)
let announcementsModuleObject = TS.projects.foundations.botModules.announcements.newFoundationsBotModulesAnnouncements(processIndex)
let snapshotsModuleObject = TS.projects.algorithmicTrading.botModules.snapshots.newAlgorithmicTradingBotModulesSnapshots(processIndex)
let tradingEpisodeModuleObject = TS.projects.algorithmicTrading.botModules.tradingEpisode.newAlgorithmicTradingBotModulesTradingEpisode(processIndex)
@@ -162,12 +162,12 @@
}
function onSessionStop() {
TS.projects.algorithmicTrading.functionLibraries.sessionFunctions.stopSession(processIndex, 'Session Stopped From the User Interface.')
TS.projects.foundations.functionLibraries.sessionFunctions.stopSession(processIndex, 'Session Stopped From the User Interface.')
}
function onSessionResume(message) {
try {
if (TS.projects.algorithmicTrading.functionLibraries.sessionFunctions.stopSession === undefined) {
if (TS.projects.foundations.functionLibraries.sessionFunctions.stopSession === undefined) {
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).PROCESS_INSTANCE_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[WARN] onSessionResume -> Event received to resume the Session that have never be ran before. ")
return